The spool on your printer feels light, the print you want to start will take seven hours, and there's no way to weigh what's left without taking it off. Or a friend asks what a print will cost in material and you want a number before you open the slicer. A filament calculator answers both questions from the model alone: how many grams, and how many meters.
This article shows exactly how such an estimate is built, with a worked example you can redo with a pencil, a table for PLA, PETG, ABS and TPU, and an honest list of reasons your slicer's number will differ.
Short answer: Filament use depends on the model's volume, how much of it is solid wall, your infill percentage and the material's density. Estimate the shell, add the infill share of the interior, multiply by density for grams, and divide by the filament's cross-section for length. Treat the result as an estimate; supports, brims and slicer settings change the real amount.
The formula, step by step
A printed part is not solid plastic. It has a solid outer shell (walls, top and bottom layers) and a partly filled interior (infill). STL Viewer's filament estimate uses this model:
- Shell volume = the smaller of the model's volume, or its surface area x 0.8 mm. 0.8 mm is about two 0.4 mm lines.
- Effective volume = shell + infill% x (volume - shell).
- Weight = effective volume x material density.
- Length = effective volume / cross-section of the filament, where cross-section = pi x (diameter / 2)².
The "smaller of" in step 1 handles thin parts: if a model is so thin that 0.8 mm of shell would exceed its whole volume, the whole thing counts as solid.
Worked example: a 60 x 40 x 30 mm block
Take a solid block 60 x 40 x 30 mm, the kind of shape a small box or enclosure starts as.
- Volume: 6 x 4 x 3 cm = 72 cm³.
- Surface area: 2 x (6x4 + 6x3 + 4x3) = 108 cm².
- Shell: 108 cm² x 0.08 cm = 8.64 cm³ (smaller than 72, so we use it).
- Interior: 72 - 8.64 = 63.36 cm³. At 20% infill: 12.67 cm³.
- Effective volume: 8.64 + 12.67 = 21.31 cm³.
- Weight in PLA (1.24 g/cm³): 21.31 x 1.24 = 26.4 g.
- Length with 1.75 mm filament: cross-section = 3.1416 x 0.875² = 2.405 mm². 21,310 mm³ / 2.405 mm² = 8,861 mm = 8.9 m.
With 2.85 mm filament (cross-section 6.379 mm²) the same plastic is only 3.3 m long, because each meter holds 2.65 times as much material.
PLA, PETG, ABS and TPU compared
Same block, same 20% infill, effective volume 21.31 cm³:
| Material | Density (g/cm³) | Weight | Length, 1.75 mm | Length, 2.85 mm |
|---|---|---|---|---|
| PLA | 1.24 | 26.4 g | 8.9 m | 3.3 m |
| PETG | 1.27 | 27.1 g | 8.9 m | 3.3 m |
| ABS | 1.04 | 22.2 g | 8.9 m | 3.3 m |
| TPU | 1.21 | 25.8 g | 8.9 m | 3.3 m |
Notice that length doesn't depend on the material: the same volume of plastic is the same length of filament. Weight does, which is why a 1 kg spool of ABS holds about 22% more length than a 1 kg spool of PETG (1.27 / 1.04 = 1.22).
How much does infill really change?
Less than most people think, because the shell is a fixed cost. For the same block in PLA:
| Infill | Weight | Length (1.75 mm) |
|---|---|---|
| 0% | 10.7 g | 3.6 m |
| 10% | 18.6 g | 6.2 m |
| 20% | 26.4 g | 8.9 m |
| 50% | 50.0 g | 16.8 m |
| 100% | 89.3 g | 29.9 m |
Going from 20% to 15% saves about 4 g here. Going from 20% to 100% more than triples the plastic. For small and thin parts, the shell dominates and infill barely matters.
Why your slicer shows a different number
- Supports can add anything from a few grams to more than the model itself.
- Brims, skirts and rafts add a few grams to a dozen or more on large footprints.
- Wall count and top/bottom layers: three walls or five top layers instead of the 0.8 mm assumed here mean more shell.
- Infill pattern: the same percentage uses slightly different amounts in different patterns.
- Purge and wipe on multi-material printers can waste a lot.
- Flow and extrusion multipliers in your profile.
So use the quick estimate for "is there enough on the spool?" and "roughly what will it cost?", and trust the slicer for the final number. Leave a margin of 10-20% when the spool is close.
Real-world use: is there enough left on the spool?
An empty spool's core typically weighs somewhere around 150-250 g depending on the brand and material; weigh one empty spool once and write it down. A spool that weighs 390 g total with a 220 g empty core has about 170 g of filament left. If the estimate for your print in PETG at 15% infill is 120 g and the model needs a bit of support, you're fine. If it's 160 g, change the spool.
Getting the estimate on your phone
- Open the model in STL Viewer for Android.
- Open the info panel and find the filament estimate.
- Pick PLA, PETG, ABS or TPU, choose 1.75 or 2.85 mm, and move the infill slider (it starts at 20%).
- Read weight and length. Your default material and diameter can be set in Settings.
The estimate needs a watertight model; if the mesh has holes, the app says the volume and filament can't be measured reliably. See what watertight means. The filament estimate guide has screenshots, and the rest of the pre-print routine is in the 8-point checklist. Scaling a model changes all of this by the cube of the factor; the scaling guide shows why a 125% copy uses almost twice the filament.
The STL Viewer website lists the materials and filament diameters the estimate supports.
Frequently asked questions
How do I calculate how much filament a print needs?
Estimate the solid shell from the surface area, add your infill share of the remaining volume, then multiply by the material density for grams or divide by the filament cross-section for length.
How many meters of 1.75 mm filament are in a gram of PLA?
About 0.34 m: one gram of PLA is roughly 0.81 cm³, and 1.75 mm filament holds about 2.4 mm³ per millimeter of length.
Why does my slicer show more filament than the estimate?
Supports, brims, extra walls, infill pattern and purge lines all add material that a quick model-based estimate leaves out.
Does infill percentage change filament use a lot?
It depends on the part. For thick solid parts it matters a lot; for thin parts the walls dominate and infill changes little.