STL Filament Calculator

Drop an STL file to see its size, volume and surface area, and get an estimate of how much filament a print will use and what it costs. The file stays on your device.

The file is read on this device and not uploaded to any server.

File units
g/cm³
Filament diameter
%
mm

Walls and top and bottom layers, treated as one solid skin. 0.8 mm is about two walls with a 0.4 mm nozzle.

/ kg

Any symbol or code, such as $, €, £ or EUR.

These figures are an estimate. Your slicer decides the real amount from the walls, top and bottom layers, infill pattern and supports you choose.

Need this for a whole folder, or for 3MF files? STL Viewer for Mac does it on your Mac.

How to use it

  1. Drop an .stl file on the box or press the button to pick one. Binary and ASCII STL both work.
  2. Check the size. If the part looks 25.4 times too small, the file was drawn in inches: switch File units to inches.
  3. Choose the material (or type the density from your spool's data sheet), the filament diameter, the infill and the shell thickness you plan to slice with.
  4. Enter what you paid for a 1 kg spool to see the cost. Treat the result as an estimate; your slicer's preview gives the real figure.

How the volume is measured

An STL file is a list of triangles and nothing else. The tool reads every triangle and adds up the signed volume of the tetrahedron that each one forms with a fixed point: v0 · (v1 × v2) / 6. By the divergence theorem the sum equals the enclosed volume, exactly, as long as the surface is closed. The surface area is the sum of the triangle areas, and the size is the bounding box along the file's X, Y and Z axes.

STL files have no units. Almost every 3D printing workflow uses millimetres, so that is the default. A file exported in inches looks 25.4 times too small; the inches setting multiplies lengths by 25.4, areas by 25.4² and volumes by 25.4³.

Is the mesh closed?

The volume only means something for a closed (watertight) mesh. The tool welds vertices that sit at the same position and then checks that every edge is shared by exactly two triangles. An edge used by one triangle is the rim of a hole; an edge used by three or more is non-manifold. Either way the volume is unreliable and a slicer may need to repair the file first. A negative volume means the triangles face inwards; the tool uses the absolute value.

The filament estimate

A slicer does not fill a part solid. It prints a few solid walls and top and bottom layers (the shell) and fills the inside with a sparse infill pattern. This tool approximates that with one number for the shell thickness:

  • Shell volume = surface area × shell thickness, capped at the part volume
  • Plastic volume = shell volume + (part volume − shell volume) × infill %
  • Weight (g) = plastic volume (cm³) × density (g/cm³)
  • Length (m) = plastic volume ÷ (π × (diameter ÷ 2)²)
  • Cost = weight (kg) × spool price per kg

Shell thickness 0.8 mm is roughly two perimeters with a 0.4 mm nozzle. Set it to 0 and the infill to 100% to get the weight of a fully solid part.

Material densities

MaterialTypical density1.75 mm, metres per kg2.85 mm, metres per kg
PLA1.24 g/cm³335126
PETG1.27 g/cm³327123
ABS1.04 g/cm³400151
TPU1.21 g/cm³344129

These are common values; brands and blends vary (filled, silk and carbon-fibre filaments especially). The density on your spool's technical data sheet is the one to use.

Why your slicer shows a different number

The slicer knows things this estimate does not: the exact number of walls and top and bottom layers, the infill pattern (gyroid and cubic use different amounts at the same percentage), supports, brims and rafts, purge and wipe towers, the first-layer squish and the extrusion multiplier. Small parts are mostly shell, so the estimate is sensitive to the shell thickness there; big parts are mostly infill. Expect the slicer's figure to land within a few tens of percent of this one, and use the slicer when the exact amount matters.

How this tool works

The file is read by JavaScript in your browser and never uploaded. Binary STL is recognised by its size (an 80-byte header, a triangle count and 50 bytes per triangle), so binary files whose header starts with the word solid are read correctly; anything else that starts with solid and contains facet or vertex is read as ASCII.

Questions

How do I calculate how much filament an STL file needs?
Drop the file here, choose the material, infill and shell thickness, and read the weight in grams and the length in metres. The figure is an estimate built from the part's volume and surface area; slicing the file in PrusaSlicer, Cura, Bambu Studio or OrcaSlicer gives the exact amount for your settings.
Why is the volume not the same as the filament used?
The volume is the space the solid part takes up. A print is normally hollow inside apart from the infill, so it uses much less plastic than a solid block of that volume. Set infill to 100% and shell to 0 to see the weight of a fully solid part.
My part looks tiny. What is wrong?
STL files carry no units. If the size shows something like 2 × 1 × 0.5 mm for a part that should be a few centimetres, the file was exported in inches. Switch File units to inches and every figure is multiplied by 25.4 (lengths), 25.4² (area) or 25.4³ (volume).
What does "open mesh" mean?
Some edges belong to only one triangle (a hole) or to more than two (non-manifold geometry). The volume of an open mesh is not reliable. Most slicers repair small holes automatically; for bigger problems, fix the model in the program that made it.
Is my file uploaded?
No. The STL file is read and measured by your browser on your own device. Nothing about it is sent to a server.
How big a file can it handle?
Binary files of a few hundred megabytes usually work on a computer; the browser holds the whole file in memory while measuring it, so very large files can fail on a phone. ASCII STL takes about five times the space of binary for the same mesh and is slower to read.