Sparrow Tools › Guides

How to calculate 3D printing cost: filament, power and time

Short answer: Add filament cost, electricity, machine time and any extra cost per part. Filament cost is grams / 1000 × price per kg; electricity is watts × hours / 1000 × price per kWh. Our STL calculator estimates deposited plastic from shell volume plus infill, then adds your chosen markup. Treat its time and material results as preliminary estimates.

Last updated 22 October 2026 · Sparrow Tools · Formulas checked against the calculator code

Separate model volume from printed plastic

A model's enclosed volume is not automatically the amount of filament deposited. The calculator measures the STL mesh, estimates a shell from surface area × wall thickness, then fills the remaining interior at your selected infill fraction. The shell estimate is capped at the model volume.

Its formula is printed volume = shell + (model volume − shell) × infill. This is a quick geometric model, not a slicer. It does not generate paths, recognize support structures or account for detailed perimeter settings. Start with a closed mesh and check that the interpreted dimensions match your intended part.

Turn plastic volume into filament cost

Printed cubic millimeters divided by 1000 give cubic centimeters. Multiply by filament density in g/cm³ to estimate grams. Then divide grams by 1000 and multiply by the spool price per kilogram. Use the price and density for the material you actually intend to print.

The tool links Prusament technical data sheets for its named material presets. Those sheets describe specific products; a preset is not a universal specification for all filament sold under the same polymer name. A custom density lets you use your own product documentation instead.

Worked example with explicit assumptions

Assume a measured model volume of 100000 mm³, area of 15000 mm², scale factor 1, wall thickness 1 mm and 20% infill. For this arithmetic example, choose a custom density of 1.20 g/cm³ and filament price of $25/kg. These are hypothetical job inputs, not measured market averages.

Shell volume is 15000 mm³. The remaining 85000 mm³ contributes 17000 mm³ of infill. Total deposited volume is therefore 32000 mm³, giving 38.4 g and $0.96 in material cost. The solid model volume would overstate the plastic in this simplified example.

Add time, electricity and machine use

The function estimates hours as printed mm³ / flow in mm³ per second / 3600. With an assumed flow of 5 mm³/s, the example takes 1.777778 hours. This excludes travel behavior and other slicer timing details. A flow input is an estimate, not a measured completion time.

Assume 100 watts, electricity at $0.20/kWh, machine use at $1/hour and $2 extra per part. Electricity becomes $0.035556 and machine use $1.777778. The extra field is a fixed amount per part: include whatever cost you intend to represent there, keeping track of how you derived it.

One-part componentCost before rounding
Filament$0.96
Electricity$0.035556
Machine time$1.777778
Extra per part$2.00
Total cost$4.773333

Markup and quantity

At an illustrative 25% markup, price is cost × 1.25 = $5.966667, displayed as $5.97 per part. Markup is applied to cost; it is not the same thing as declaring that percentage of the final selling price to be profit. Keep the term clear when comparing quotes.

For quantity three, the function multiplies the unrounded price and gives $17.90, with 115.2 g and 5.333333 estimated hours. Multiplying the displayed $5.97 by three would instead give $17.91. That penny difference comes from when rounding occurs. Choose a consistent billing policy rather than treating rounded display numbers as full-precision inputs.

Compare a changed setting

With the same assumptions but 100% infill, printed volume becomes 100000 mm³, mass 120 g and time 5.555556 hours. Material is $3.00 and total cost is $10.666667. After the same markup, price is $13.333333 per part and $40.00 for three.

That comparison isolates the effect of infill within this model. A real slicer can change other details at the same time. Likewise, changing scale affects volume cubically and surface area quadratically, so doubling a dimension is not a simple doubling of the cost inputs.

Before issuing a final quote

The model omits supports, brims, purge and failed prints. It does not establish a failure allowance or a market rate for labor. Slice the actual job and check material and duration before committing to a final quote. Revisit the extra and machine inputs if your intended work includes costs not represented by filament and electricity.

Try it with your own inputs

Enter your measured inputs and check the units and assumptions before using the result. The examples above can be reproduced in the calculator; your own inputs will change the estimate.

FAQ

Does STL volume equal filament volume?

Not necessarily. This calculator estimates shells and infill; a slicer can provide a more detailed estimate for the actual print settings.

What electricity formula is used?

Watts × hours / 1000 × price per kWh. Enter an appropriate power estimate and your own electricity price.

Does the estimate include supports and failed prints?

No. Supports, brims, purge and failed prints are omitted by this model.

Why can the batch total differ from rounded unit price times quantity?

The calculator multiplies the unrounded unit price by quantity, then displays the total. Rounding each unit first can change the last cent.

Sources

Calculation examples checked against the linked source code on 22 October 2026. Example inputs are identified in the text; they are not universal product specifications or recommended rates.

Related

Markup versus margin → · 3D Print Cost Calculator