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

[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [HacknetNodesFormulas](./bitburner.hacknetnodesformulas.md) &gt; [ramUpgradeCost](./bitburner.hacknetnodesformulas.ramupgradecost.md)

## HacknetNodesFormulas.ramUpgradeCost() method

Calculate cost of upgrading hacknet node ram.

**Signature:**

```typescript
ramUpgradeCost(startingRam: number, extraLevels?: number, costMult?: number): number;
```

## Parameters

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

Parameter


</th><th>

Type


</th><th>

Description


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

startingRam


</td><td>

number


</td><td>

starting ram


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

extraLevels


</td><td>

number


</td><td>

_(Optional)_ amount of level of ram 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.

