<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) > [bitburner](./bitburner.md) > [HacknetServersFormulas](./bitburner.hacknetserversformulas.md) > [hashUpgradeCost](./bitburner.hacknetserversformulas.hashupgradecost.md) ## HacknetServersFormulas.hashUpgradeCost() method Calculate hash cost of an upgrade. <b>Signature:</b> ```typescript hashUpgradeCost(upgName: number, level: number): number; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | upgName | number | name of the upgrade | | level | number | level of the upgrade | <b>Returns:</b> number The calculated hash cost.