STL Viewer BlogSTL Viewer for Mac

STL Filament Cost Calculator: Estimate Grams and Cost on a Mac

By Ihwan · · 5 min read

A friend asks how much you would charge to print a part, or you are staring at a spool with maybe 150 g left and wondering whether tonight's print will finish. You have the STL on your Mac. Slicing it to get the number works, but it means picking a printer profile, waiting, and repeating it for every file. An STL filament cost calculator gives you a solid estimate straight from the mesh, in seconds.

Here is how that estimate is calculated, a worked example you can check by hand, why your slicer will land a little differently, and how to handle a whole folder of files on a Mac.

Short answer: Filament weight is roughly (shell + infill x inner volume) x density. For a single STL, a free in-browser calculator gives grams, meters and cost. On a Mac, STL Viewer for Mac shows the same kind of estimate per file for STL, 3MF, OBJ and PLY and copies it as a print report. Treat every such number as an estimate; the slicer has the final word.

The formula behind a filament estimate

A printed part is not solid plastic. It has a skin of walls, top and bottom layers, and a sparse infill inside. A mesh-based estimate models that in four steps:

  1. Shell volume = the smaller of the model's volume and its surface area x 0.8 mm. The 0.8 mm stands in for typical walls and skins (two lines of a 0.4 mm nozzle).
  2. Printed volume = shell + infill % x (volume - shell).
  3. Weight = printed volume x material density.
  4. Length = printed volume / cross-section area of the filament (1.75 mm or 2.85 mm diameter).

Densities commonly used: PLA 1.24 g/cm³, PETG 1.27, ABS 1.04, TPU 1.21. The "min" in step 1 matters for small or thin parts: a 3 mm thick plate is almost entirely shell, so infill hardly changes its weight.

Worked example: a 50 mm cube in PLA

Take a 50 x 50 x 50 mm calibration cube, PLA, 20 % infill, 1.75 mm filament.

Now the money. Cost is weight divided by 1,000 times what you paid for a 1 kg spool. 42.9 g is 4.29 % of a kilogram, so this cube costs about 4.3 % of your spool price, and one spool makes roughly 23 of them. Plug in your own spool price in your own currency and you have a material cost you can defend. For a quote, add electricity, wear, failed prints and your time on top.

The same cube with other settings:

Material / infillWeightLength (1.75 mm)
PLA, 0 %about 14.9 gabout 5.0 m
PLA, 20 %about 42.9 gabout 14.4 m
PLA, 100 %about 155 gabout 52.0 m
PETG, 20 %about 43.9 gabout 14.4 m
ABS, 20 %about 36.0 gabout 14.4 m

Length stays the same across materials at the same infill: it depends on volume and diameter, not on density. With 2.85 mm filament the 20 % cube needs only about 5.4 m, because each meter carries more plastic.

Why your slicer gives a different number

Expect the slicer to differ by a few grams either way. It knows things a mesh estimate cannot:

A mesh estimate is ideal for comparing files, quoting quickly and checking a spool. For a large print with a tight margin, slice it. The phone-side view of the same idea is in how much filament a print needs.

Note: Check the size before trusting any weight. A part drawn in inches but read as millimeters is 25.4 times too small in each direction, so its estimated weight is over 16,000 times too low. See inches vs millimeters.

A free calculator for a single STL

For one file, the free in-browser STL filament calculator is the quickest route: drop an STL in, and it reports size, volume, grams, meters and cost. It works on any Mac with a browser and needs no install. It takes one STL at a time, so 3MF projects and multi-file jobs need another tool.

Doing it on a Mac, file by file and by folder

STL Viewer for Mac shows a print estimate for each model it opens, whether STL, 3MF, OBJ or PLY. You choose PLA, PETG, ABS or TPU, 1.75 or 2.85 mm, set infill from 0 to 100 %, and enter your price per kg in your currency. It uses the shell-and-infill model above, so the 50 mm cube comes out at about 42.9 g and 14.4 m. File > Copy Print Report copies the size, volume and estimate as text you can paste into a quote or a message.

For many files, Batch Convert processes a folder and its subfolders and writes a summary.csv. Be clear about what that file holds: triangle count, size, volume and watertight status per file. It has no filament or cost columns. It is still useful for sorting a batch by volume, spotting the heavy parts and flagging meshes that are not watertight; open the big ones individually for their estimate. Batch Convert needs a license after the 14-day trial; the per-file estimate and print report keep working.

A short walk-through is in the filament cost from STL guide, and opening and checking STL files on a Mac covers the rest of the inspection.

Frequently asked questions

How do I calculate filament cost from an STL?

Estimate the printed volume as shell plus infill times the inner volume, multiply by the material density to get grams, then multiply grams by your spool price per kg divided by 1000.

How much filament does a 50 mm cube need?

In PLA at 20 % infill, about 42.9 g, or about 14.4 m of 1.75 mm filament. It is an estimate; your slicer may differ by a few grams.

Why is my slicer's filament number different?

The slicer uses your exact walls, top and bottom layers, infill pattern, supports and brim, which a mesh-based estimate approximates.

Does the batch summary.csv include filament or cost?

No. The summary.csv from Batch Convert in STL Viewer for Mac lists triangle count, size, volume and watertight status per file; open a model to see its filament estimate.