<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [HacknetServersFormulas](./bitburner.hacknetserversformulas.md) &gt; [levelUpgradeCost](./bitburner.hacknetserversformulas.levelupgradecost.md)

## HacknetServersFormulas.levelUpgradeCost() method

Calculate cost of upgrading hacknet server level.

**Signature:**

```typescript
levelUpgradeCost(startingLevel: number, extraLevels?: number, costMult?: number): number;
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

startingLevel


</td><td>

number


</td><td>

starting level


</td></tr>
<tr><td>

extraLevels


</td><td>

number


</td><td>

_(Optional)_ amount of level to purchase (defaults to 1)


</td></tr>
<tr><td>

costMult


</td><td>

number


</td><td>

_(Optional)_ player cost reduction (default to 1)


</td></tr>
</tbody></table>

**Returns:**

number

The calculated cost.

