Musings and Experiments on the Art and Science of 3D Printing


To extrude (relative) or not to extrude (relative), THAT is the question!

By SublimeLayers Tuesday, October 24, 2017
I am asked several times a month about the difference between absolute and relative extrusion and which one is better to use. So let's jump in and see...

Absolute and relative positioning are two different ways to specify how far, overall, to travel, move, or even extrude. In absolute positioning, you start at position "0" (typically) called the origin. All positions from there are given as the distance from the origin. With relative positioning, you also start from an origin ("0"), but each time you make a move to a new position, you reset to "0" at that new location. Each move is the distance from the previous location, not from the origin. Let's look at some concrete examples to clarify:

Let's consider absolute positioning first. Imagine you are in your car and need directions to the nearest ice cream stand. You pull over (origin) and ask a stranger for directions. Her directions go like this:
  • drive 1.1 miles until you see a red barn, then turn left
  • drive until your odometer reads 1.6 miles (from the origin) and turn right on Swift St.
  • you will see the ice cream stand on the left when your odometer reads 3.9 miles (from the origin)
Now, let's see what these directions would look like in relative distances.

  • drive another .5 miles (from the red barn, the previous location) and turn right on Swift St.
  • the ice cream stand will be another 2.3 miles (from the previous location) on the left
These directions are simple and straightforward to follow. The direction giver is using relative distances to describe each segment you must drive. Overall, you will drive 3.9 miles to get to the ice cream stand.

Absolute and relative extrusion work the same way. The following diagram illustrates the difference. With absolute extrusion, the actual distance for each segment/extrusion from the origin (E0.0) is rounded off in the underlying math - the red digits in the diagram. These rounding errors accumulate as the print progresses and reduce the accuracy of the extrusion.

With relative extrusion, the round-off error is reset with each segment so it does not accumulate.

In general, it is best practice to use relative extrusion over absolute extrusion to eliminate the accumulated round-off error. This is generally done in the pre-amble - or header - in your g-code file and is done by your slicer. The code for absolute extrusion mode is M82, the code for relative extrusion mode is M83. Most slicers simplify this with a simple menu or checkbox to specify extrusion mode.

So the answer to the question that started this post is to extrude relative!

Unfortunately, not all slicers support relative extrusion and to make matters worse, most firmwares set a default extrusion mode. If the slicer sends g-code to firmware that does not explicitly include either M82 o M83, all heck can break loose!

KISSlicer, Slic3r and Slic3r Prusa Edition, and Simplify3D all support relative extrusion. Cura, Matterslice and CraftWare DO NOT support relative extrusion.

UPDATE: rumor has it that Cura 3.0 has relative extrusion (finally). I have not validated this yet.

Here's where to set extrusion mode in the slicers that support it.



Open one of your g-code files in a text editor and take a look at the top header section of the file and look for that M82 or M83 code.

One interesting caveat of absolute vs relative extrusion is that in order to retract, relative extrusion will ALWAYS specify a negative value. Absolute extrusion will specify a positive value that will simply be less than the previous position.

Absolute retractG1 E1042.439 F1500

Relative retract: G1 E-1.5 F1500

That's it for now, please subscribe to my blog and YouTube channel

2 comments to ''To extrude (relative) or not to extrude (relative), THAT is the question!"

  1. You do realise that if the steps on your extruder cannot handle the 3 decimal place of mm extrusion, which most cannot then what you have written is not true.
    With Absolute extrusion there is a global extrusion error, which can be a maximum of 1 motor move (which is actually a fraction of a full step) (-0.5 to +0.499).
    With Relative extrusion every extrusion distance can have an error of 1 motor move.
    Ergo the Global extrusion error accumulates vastly faster with Relative extrusion

  2. Hello Michael,

    In regard to this forum-thread:
    would you care to elaborate James his comment from August 18th? I have been having some issues that are in retrospect likely to find origin in this matter, so I am curious to your thoughts.