Filament (with waste)
Electricity
Other
Cost per print
Price with markup
Total cost for all prints
How it is calculated
Filament cost = part weight × (1 + waste %) ÷ 1000 × price per kg. Electricity cost = average power in kW × print hours × price per kWh. Cost per print = filament + electricity + other costs. Markup is applied on top of that.
Most hobby printers draw far less than their rated maximum once the bed and hotend are at temperature, so use the average power over a whole print. A plug-in energy meter gives the best number.
These are estimates for planning only. Real costs also depend on failed prints, machine wear and your time.