The cost of an FDM print comes from a small number of inputs: how much plastic it uses, how long the printer runs, what you pay for filament and electricity, and, if you sell prints, what you charge for the machine and your own time. This calculator adds them up with a fixed formula. Below is exactly what it does, where each input comes from and how to choose your rates.
The formula
First the print time is turned into hours: hours = seconds ÷ 3,600. Then four cost lines are calculated:
- Material = grams ÷ 1,000 × filament price per kg
- Electricity = printer watts × hours ÷ 1,000 × electricity price per kWh
- Machine time = hours × machine rate per hour
- Setup = setup fee (a fixed amount per job)
These four add up to the subtotal. The margin is the subtotal × margin % ÷ 100, and the total is the subtotal plus the margin, or the minimum price if that is higher. Each line and the total are rounded to two decimals only at the end. The total is calculated from the unrounded values, so if you add up the rounded lines by hand you can occasionally be one cent away from it; the total is the more accurate figure.
A worked example
Take a phone stand that uses 60 g of PLA and prints in 4 hours 10 minutes (15,000 seconds, or 4.1667 hours). The rates are 20 per kg of filament, 0.25 per kWh, a printer drawing 150 W on average, a machine rate of 1.50 per hour, a setup fee of 2, a margin of 30 % and a minimum price of 5.
- Material: 60 ÷ 1,000 × 20 = 1.20
- Electricity: 150 × 4.1667 ÷ 1,000 = 0.625 kWh, × 0.25 = 0.15625, shown as 0.16
- Machine time: 4.1667 × 1.50 = 6.25
- Setup: 2.00
- Subtotal: 1.20 + 0.15625 + 6.25 + 2 = 9.60625, shown as 9.61
- Margin: 9.60625 × 30 ÷ 100 = 2.881875, shown as 2.88
- Total: 9.60625 + 2.881875 = 12.488125, which is above the minimum of 5, so the price is 12.49
Notice what dominates: the plastic costs 1.20 and the electricity 16 cents, but the machine time is 6.25. For most small and medium prints, time is worth far more than material, which is why a calculator that only counts grams underprices any job you sell.
Where the grams and the print time come from
Your slicer reports both after it slices the model. It knows the length of filament every line pushes, and converts that length to weight with the material's density. A metre of 1.75 mm filament has a cross-section of π × 0.875² ≈ 2.405 mm², so it holds about 2.4 cm³ of plastic; at the 1.24 g/cm³ the STL slicer on this site uses for PLA, that is roughly 3 grams per metre. PLA's density is usually given as about 1.21 to 1.43 g/cm³ depending on its grade, and PETG is slightly denser, so the same length of a different material can weigh a little more or less.
The print time is an estimate. Slicers time each move with the printer's acceleration settings, but real firmware blends moves together and the printer spends a few minutes heating before the first layer, so the actual time can differ. If you sell prints regularly, compare a few estimates with the real times on your printer and adjust your machine rate if your printer is consistently slower than the estimate.
If you have the model but not the numbers, slice it in the online STL slicer: its cost panel prices the result with the same formula and the same saved rates as this page.
Choosing your rates
Filament price per kg. Divide what you paid for a spool by its net weight in kilograms. A 1 kg spool at 20 is 20 per kg; a 750 g spool at 18 is 24 per kg. Include shipping if you want the true cost. Some prints also waste plastic on a purge line, a skirt or failed starts; if you want to cover that, raise the price per kg slightly rather than inflating the grams.
Electricity price per kWh. Use the all-in price per kWh from your bill, including taxes and network charges. For scale, Eurostat puts the EU average household price in the second half of 2025 at about €0.29 per kWh, ranging from about €0.11 in Hungary to about €0.40 in Ireland, and the US Energy Information Administration reported an average US residential price of 18.31 cents per kWh for July 2026.
Printer power. This is the average draw while printing, not the power supply's rating. The heated bed pulls a lot while warming up and much less once it holds temperature. Prusa reports an average of about 80 W for its MK-series printers printing PLA at room temperature and about 120 W for ABS. Large-bed printers draw more. The default here, 150 W, is a deliberately generous figure; the most accurate value comes from a plug-in energy meter over a whole print. A kilowatt-hour is one kilowatt sustained for one hour, so a 150 W printer running for 10 hours uses 1.5 kWh.
Machine rate per hour. This covers the printer itself: its purchase price spread over the hours you expect it to print, plus nozzles, belts, build plates and repairs. As an illustration, a printer that cost 600 and that you expect to run for 3,000 hours before it needs replacing costs 0.20 per hour before maintenance. Hobbyists printing for themselves usually leave this at 0.
Setup fee. A fixed amount per job for the time around the print: checking the file, slicing, starting the printer, removing the part and cleaning it up. Removing supports or sanding a part can take longer than the print itself, and this is where that time belongs.
Margin and minimum price. The margin here is a percentage added on top of cost, which accountants call a markup. It is not the same as a profit margin measured on the selling price: a 30 % markup on a cost of 10 gives a price of 13, and the profit of 3 is 23 % of that price. If you think in profit margin, a markup of m ÷ (1 − m) gives it, so a 25 % profit margin needs a 33.3 % markup. The minimum price is a floor: a 3 g replacement knob costs pennies in material, but it still takes your time to quote, print and hand over.
Three ways people use it
- A hobbyist keeps the defaults and sets only the filament and electricity price, to see what a project really costs. Most small prints come out well under the price of a coffee.
- A maker selling on a marketplace adds a machine rate, a setup fee and a 30 to 50 % margin, then checks each listing: a design that takes 14 hours may need a higher price or a faster print profile to be worth selling.
- A school or makerspace charges members for material and electricity only, with a small minimum so that tiny test prints still cover the paperwork.
What this calculator does not include
It prices one print on one FDM printer. It does not add shipping or packaging, taxes such as VAT or sales tax, or payment and marketplace fees, which vary by country and platform. It does not model failed prints automatically; if one print in ten fails, a simple way to cover it is to raise your margin by about 10 %. Resin printing is priced differently (by millilitres of resin, plus wash and cure consumables), so this formula does not fit it.
| Cost line | What drives it | Typical share on a small print |
| Material | Grams × price per kg | Small |
| Electricity | Watts × hours × price per kWh | Very small |
| Machine time | Hours × machine rate | Often the largest when a rate is set |
| Setup | Fixed per job | Large on short jobs |