STL cost calculator: filament weight and print cost from a 3D model

Load an STL, or type the model's volume and surface area. The calculator reads the mesh in your browser, estimates the grams a slicer would use with your walls and infill, and prices them.

Model

The file is read in your browser and never uploaded. Volume and area fill in from it, or type them yourself.

STL files carry no units. Most are millimeters.

cm³
cm²
Slicer settings

Walls times line width is the shell thickness. Copy them from your slicer's print profile.

%
mm
Filament

Picking a material fills in its data-sheet density. Net weight is the filament alone, not the reel.

g/cm³
g

Filament cost of the print

–

Estimated filament

–

If printed solid

–

Cost per cm³ of model

–

The formula

A slicer does not fill a model solid. It prints a shell of walls around the outside and a sparse infill inside. The calculator estimates both from two numbers the mesh gives: its volume and its surface area.

shell (cm³)    = smaller of: volume, or surface area x shell thickness
shell thickness = walls x line width
core (cm³)     = volume - shell
grams          = density x (shell + infill x core)
cost           = grams x spool price / spool grams

The defaults are a 20 mm cube printed in PLA at a density of 1.24 g/cm³, with 2 walls of 0.45 mm and 15% infill. PLA comes from $19.99 for a 1 kg spool, Polymaker’s US price for PolyLite PLA.

Reading the STL

An STL (stereolithography) file is a list of triangles and nothing more. The binary form has an 80-byte header, a triangle count, then 50 bytes per triangle holding a normal and three corner points. The ASCII form spells the same thing out between “solid” and “endsolid” lines. Both store coordinates with no units, so the calculator asks: millimeters for most files, inches for some older computer-aided design (CAD) exports.

The volume comes from a method published by Cha Zhang and Tsuhan Chen. Join each triangle to the origin to make a small tetrahedron, take each one’s signed volume, and add them up. Tetrahedra outside the model cancel against those inside, so the sum is the enclosed volume. The surface area is the sum of the triangles’ areas. Your browser does the sum, and the file never leaves your computer.

How do you estimate 3D print cost from an STL file?

Read the model’s volume and surface area from the STL. The shell is the area times walls times line width. Add your infill share of the rest, then multiply by density for grams and by the price per gram. A 20 mm cube with 2 walls and 15% infill needs about 3.8 g of PLA, under 8 cents.

Worked example with the defaults

  1. Volume 8 cm³, surface area 24 cm² (a 20 mm cube).
  2. Shell thickness: 2 x 0.45 mm = 0.9 mm. Shell: 24 cm² x 0.09 cm = 2.16 cm³.
  3. Core: 8 - 2.16 = 5.84 cm³. Infill: 15% of that is 0.876 cm³.
  4. Plastic: 2.16 + 0.876 = 3.04 cm³ x 1.24 g/cm³ = 3.76 g.
  5. Cost: 3.76 g x $0.02 per gram = $0.08.

Printed solid, the same cube would weigh 9.92 g.

Slicer defaults to copy

Slicer profile Walls Line width Top / bottom layers Infill
Bambu Studio, 0.20mm Standard 2 0.42 outer, 0.45 inner 5 / 3 15%
PrusaSlicer, 0.20mm SPEED (MK4S, CORE One) 2 0.45 5 / 3 15%
UltiMaker Cura, base definition 2 0.4 4 / 4 at 0.2 mm 20%

Values from each slicer’s own bundled profiles. Prusa’s knowledge base notes that its profiles always use at least two perimeters, its word for walls.

Where the estimate goes wrong

The shell model gives every surface the side walls’ thickness. Top and bottom skins are often thicker: 5 top layers at 0.2 mm is 1 mm. So flat, wide parts come out a little light. Thin walls, small holes and fine text come out heavy, because the shell overlaps itself where the calculator counts it twice. The calculator caps the shell at the model’s volume, so a part thinner than two walls counts as solid.

Supports, brims and purge are not in the model at all, so add them on top. For an exact figure, slice the model once and compare the slicer’s grams with the estimate. If they differ, adjust the walls or line width until they agree, and later models with the same settings will land closer.

How much does 3D printing cost per cubic centimeter?

Printing PLA yourself costs about 2.5 cents of filament per cubic centimeter of solid plastic, at 1.24 g/cm³ and $19.99 per kg. A model costs less per cubic centimeter than that, because walls and infill leave most of it hollow. The default 20 mm cube works out to under 1 cent per cm³ of model.

Per cubic inch

A cubic inch is 16.39 cm³. Solid PLA at the same price costs about 41 cents of filament per cubic inch.

Bigger parts cost less per cm³

Volume grows faster than surface area as a part gets bigger, so infill makes up more of a big part. With the default settings, a 50 mm cube (125 cm³, 150 cm² of surface) needs about 37.5 g, 75 cents of PLA. That is 0.6 cents per cm³ of model, against 0.94 cents for the 20 mm cube. Per-volume pricing therefore favors large, simple parts and penalizes small, detailed ones.

What print services charge

Online services price each part from its own quote rather than a published rate per cm³. JLC3DP, for example, lists FDM printing from $1.00 a part and quotes the rest per model. A service quote covers machine time, labor, failures and margin as well as plastic, so it will sit well above the filament cost here. The print cost calculator adds those lines for your own printer, and the filament cost calculator compares spool prices.

Published · Figures last checked