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.
Walls and top and bottom layers, treated as one solid skin. 0.8 mm is about two walls with a 0.4 mm nozzle.
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
- Drop an .stl file on the box or press the button to pick one. Binary and ASCII STL both work.
- Check the size. If the part looks 25.4 times too small, the file was drawn in inches: switch File units to inches.
- 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.
- 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
| Material | Typical density | 1.75 mm, metres per kg | 2.85 mm, metres per kg |
|---|---|---|---|
| PLA | 1.24 g/cm³ | 335 | 126 |
| PETG | 1.27 g/cm³ | 327 | 123 |
| ABS | 1.04 g/cm³ | 400 | 151 |
| TPU | 1.21 g/cm³ | 344 | 129 |
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.