The formula
cost = (material + electricity + wear) ÷ (1 − failure rate)
Where it comes from
Filament is sold by the kilo and a part is measured in grams, so material is a rule of three: 80 grams from a 22-euro spool is 1.76. What gets forgotten is everything else. Six hours at 120 watts is 0.72 kWh, which at 0.15 a unit is 11 cents. And above all there are the failures: if fifteen of every hundred prints get binned, each good part carries the cost of 1.18 prints, not one.
How to work it out by hand
- Divide the grams by a thousand and multiply by the price per kilo
- Multiply the hours by the draw and by the price per kWh
- Add the hourly wear if you account for it
- Divide by one minus the failure rate
What is worth knowing
The failure rate is the number that changes the result most and the one hardest to admit. On a well-tuned home printer it runs between 5 and 15 %; on large parts, with supports, or with awkward materials like ABS, it climbs considerably. Counting it is not pessimism: it is the difference between an estimate and a wish. And if the print is for sale, two more things are missing here: the preparation and post-processing time — removing supports, sanding, gluing — which is usually the largest cost of all, and the margin. Cost per gram is for comparing parts with each other; cost per hour is for deciding whether printing something beats buying it ready-made.