Filament price alone badly understates what a 3D print really costs. This calculator adds the three hidden cost drivers — electricity, machine depreciation, and the cost of failed prints — to give an honest, all-in cost per gram you can build a quote on.
How it works
Four costs are combined and then adjusted for failures:
material = spool price / spool net weight × grams
electricity = (watts / 1000) × hours × rate per kWh
depreciation = (printer price / rated lifetime hours) × hours
all-in = (material + electricity + depreciation) / (1 − failure rate)
per gram = all-in / grams
Dividing by 1 − failure rate spreads the cost of scrapped prints across the
ones that succeed, which is the correct way to recover that loss in a price.
Example and tips
A 50 g, 5-hour print on a 500 unit printer rated for 5000 hours, drawing 120 W at 0.25 per kWh, with a 20 unit/kg spool and an 8 percent failure rate, works out to roughly 0.026 per gram all-in — about 30 percent more than the bare 0.02 per gram filament cost. Keep your rated-lifetime estimate realistic: cheap printers rarely exceed a few thousand printing hours, while well-maintained machines can run far longer, which lowers the depreciation component.