How is Percentage Done Calculated?

How is Percentage Done Calculated?

Is it on filament used or layer count? I see the estimated filament length and layer count in the g code header. Sometimes the count seems to be layers and other times maybe length.


There are numerous methods for doing this calculation. The slicer used can generate an estimate and the software used to send the gcode file to the USB port of the printer can do the calculation. There are Marlin firmware commands (M73) that can be embedded in the gcode to be displayed on the LCD of the printer (if it exists).

The simplest method uses the number of bytes of the gcode file sent and the number of bytes in the gcode file. The most accurate method is to simulate the firmware and pass the gcode file through the simulator.

If you want a better answer, then you will need to describe the tools you use to drive your printer.

I have a Lulzbot Mini 2 and it displays time elapsed and percentage done on it’s LCD screen and I was wondering how the percentage done was being calculated.

I print from the SD card with my PC disconnected.


The LCD screen will report a % done by number of gcode lines. This is not the most accurate as some gcode lines will require more time (think a long straight line across the build volume vs a small turn around a sphere,) but it is a good approximation.

Thanks, makes sense and should be relatively straightforward to implement

I miss the days when Cura would give you real time feedback of which layer was currently being printed. This definitely came in handy if there were issues or print errors with a model on a particular layer. I don’t know why this feature has been removed. Seems like a step backwards.

One could easily post-process the .gcode file to provide this feedback.