PrintMath

G-code analyzer

Upload a sliced file and this tool reads the slicer comments and extrusion moves to report exactly how much filament the print needs and what it costs.

…or drop a .gcode file here. Files never leave your device.

How it reads your file

The tool first looks for slicer comments — ;Filament used: 12.3m, ;TIME:14400, ;LAYER: — which PrusaSlicer, OrcaSlicer, SuperSlicer, Cura and Bambu Studio all write. If those are missing it falls back to summing the extrusion axis (E) in the G-code, handling both absolute (M82) and relative (M83) modes.

Weight is derived from the extrusion length, filament diameter and material density, so set those to match your spool. Everything happens locally in your browser: no file is uploaded anywhere.

For pricing the print properly, take the weight into the cost calculator.

Related tools

FAQ

Why does the weight differ from my slicer?

Check the density and diameter inputs — they must match the material and spool you are using. Most slicers assume 1.24 g/cm³ for PLA.

Is my file uploaded?

No. The analysis runs in your browser with the FileReader API. Nothing is sent to a server.

Which slicers are supported?

Any G-code file. Slicer comments give the most accurate result; extrusion summing works on all of them.