How to Calculate the Volume and Print Weight of an STL File

Mesh volume comes from summing signed tetrahedron volumes over every triangle. Multiply by material density to get weight. Here is the maths, the unit trap and why the number is an upper bound.

3 min read

Every mesh analyser reports a volume figure, and it comes from a single, very old piece of maths. Understanding it explains both why the number is reliable and the two situations where it silently lies to you.

The signed tetrahedron method

Take one triangle of the mesh with corner vectors a, b and c, and form the tetrahedron between that triangle and the origin. Its signed volume is:

V = a · (b × c) / 6

Sum this over every triangle in the mesh. Triangles facing away from the origin contribute negative volume, triangles facing toward it contribute positive volume, and everything outside the actual solid cancels exactly. What remains is the enclosed volume. This is the divergence theorem in its most practical form, and it runs in a single pass over the triangle list — even a ten-million-triangle scan is processed in well under a second.

Two conditions have to hold for the result to mean anything:

  • The mesh must be closed. A hole means part of the boundary is missing and the cancellation no longer works.
  • The winding must be consistent. If some triangles are flipped, their contribution is subtracted instead of added.

This is exactly why volume and watertightness are always reported together. If a viewer tells you the mesh is not watertight, treat the volume number as suspect rather than approximate. Our guide on watertight and manifold meshes covers how that check works.

The unit trap

STL stores bare floating-point numbers with no unit anywhere in the file. By near-universal convention those numbers are millimetres, so a 20 mm cube gives:

20 × 20 × 20 = 8000 mm³ = 8 cm³

If the exporting CAD package was set to centimetres or inches, the geometry is still valid but every derived figure is off by 10³ or 25.4³ — a factor of 1000 or roughly 16,387. A model that should weigh 10 g suddenly reports 10 kg. When a volume figure looks absurd, check the bounding-box dimensions before suspecting the maths — diagnosing scale problems lists the ratios to look for.

From volume to weight

Weight is the easy step:

weight (g) = volume (cm³) × density (g/cm³)

Typical densities for common printing materials:

Material Density (g/cm³) 8 cm³ model
PLA 1.24 9.9 g
PETG 1.27 10.2 g
ABS 1.04 8.3 g
Standard resin 1.15 9.2 g

These are typical values for unfilled materials. Composite filaments move the number a lot: wood-filled and foaming PLA are considerably lighter, while metal-filled and glow-in-the-dark blends are heavier. If you are costing a production run rather than a one-off, use the density printed on the spool's datasheet. The filament density reference covers the rest of the common materials and the spool-length conversion.

Why the number is an upper bound

Mesh volume describes a solid object. Almost nothing is printed solid. A typical FDM part is two or three perimeter walls, a few solid top and bottom layers, and 10–20 % sparse infill in between. The material actually consumed is frequently a third of the solid figure or less.

So use mesh volume for what it is good at:

  • Comparing variants. Which of two designs uses more material.
  • Costing resin prints, where parts are often hollowed but the solid figure is a sane ceiling.
  • Sanity-checking a slicer estimate. If the slicer reports more than the solid volume, something is wrong — usually supports, a brim, or a scaling mistake.

For an actual filament figure, slice the model. The slicer knows your walls, infill and support settings; the mesh does not.

Doing it without installing anything

Mes3D computes all of this in the browser: volume, surface area, watertightness and an estimated weight for PLA, PETG, ABS and resin, alongside the bounding-box dimensions you need for the unit check. The file is parsed locally and never uploaded.

Frequently asked questions

How is the volume of an STL file calculated?

By summing signed tetrahedron volumes. For every triangle with corners a, b and c, compute a dot (b cross c) divided by 6 and add the results. Contributions outside the solid cancel out, so the total is the enclosed volume. The mesh must be closed and consistently wound for the result to be correct.

How do I convert STL volume to grams?

Convert the volume to cubic centimetres by dividing cubic millimetres by 1000, then multiply by the material density. PLA is about 1.24 g/cm3, PETG 1.27, ABS 1.04 and standard resin 1.15. A 8 cm3 model in PLA weighs roughly 9.9 g if printed solid.

Why is the calculated weight higher than what my printer actually uses?

The mesh volume assumes a completely solid object. A real print is walls plus sparse infill, so a part printed at 15 percent infill can use less than a third of that. The mesh figure is an upper bound; your slicer gives the real number once infill, walls and supports are set.

What density should I use for PLA?

About 1.24 g/cm3 for standard PLA. Filled variants differ significantly: wood-fill and foaming PLA are lighter, while glow-in-the-dark and metal-filled PLA are heavier. Check the spool datasheet when accuracy matters.

Open the 3D viewer

More guides

All articles