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
- Volume 8 cm³, surface area 24 cm² (a 20 mm cube).
- Shell thickness: 2 x 0.45 mm = 0.9 mm. Shell: 24 cm² x 0.09 cm = 2.16 cm³.
- Core: 8 - 2.16 = 5.84 cm³. Infill: 15% of that is 0.876 cm³.
- Plastic: 2.16 + 0.876 = 3.04 cm³ x 1.24 g/cm³ = 3.76 g.
- 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
Sources
- Library of Congress, STL (STereoLithography) file format, binary (accessed 2026-10-08)
- Library of Congress, STL (STereoLithography) file format, ASCII (accessed 2026-10-08)
- Marshall Burns, Automated Fabrication, section 6.5: The StL format (accessed 2026-10-08)
- Cha Zhang and Tsuhan Chen, Efficient feature extraction for 2D/3D objects in mesh representation, IEEE ICIP 2001 (accessed 2026-10-08)
- Bambu Lab, BambuStudio process profiles (0.20mm Standard) (accessed 2026-10-08)
- Prusa Research, PrusaSlicer settings for Prusa FFF printers (accessed 2026-10-08)
- UltiMaker, Cura fdmprinter.def.json (accessed 2026-10-08)
- Prusa Knowledge Base, Layers and perimeters (accessed 2026-10-08)
- Bambu Lab, PLA Basic technical data sheet V3.0 (accessed 2026-09-24)
- Polymaker, PolyLite PLA (US store, 1 kg price) (accessed 2026-10-08)
- JLC3DP, 3D printing service (FDM pricing) (accessed 2026-10-08)