---
tag: m0218
title: Set Hotend Offset
brief: Set the offset of a hotend (from hotend 0).
author: thinkyhead

requires: EXTRUDERS>1
group: calibration

codes: [ M218 ]

notes: |
  - Requires 2 or more nozzles.
  - The default hotend offsets are set with `HOTEND_OFFSET_[XYZ]`.
  - Z hotend offset only available with `DUAL_X_CARRIAGE` or `SWITCHING_NOZZLE`.
  - View current hotend offsets with [`M503`](/docs/gcode/M503.html).
  - If `EEPROM_SETTINGS` is enabled, these offsets are saved with [`M500`](/docs/gcode/M500.html), loaded with [`M501`](/docs/gcode/M501.html), and reset with [`M502`](/docs/gcode/M502.html).

parameters:
  -
    tag: T
    optional: true
    description: Hotend index. Active extruder by default.
    values:
      -
        tag: index
        type: int
  -
    tag: X
    optional: true
    description: Hotend X offset
    values:
      -
        tag: offset
        type: float
  -
    tag: Y
    optional: true
    description: Hotend Y offset
    values:
      -
        tag: offset
        type: float
  -
    tag: Z
    optional: true
    description: Hotend Z offset. Requires `DUAL_X_CARRIAGE` or `SWITCHING_NOZZLE`.
    values:
      -
        tag: offset
        type: float

examples:

---

To keep nozzles aligned to the work area between tool-changes, the firmware needs to know how they relate to each other.
