G28 Command (Return to Home)

G28 sends the machine axes back to their home (reference) position, usually by way of an intermediate point you specify. It is the standard safe move before a tool change or at the end of a job.

Format

G28 X__ Y__ Z__ (via intermediate point)
G91 G28 Z0 (home Z only, incremental)

How it works

  • The axes first move to the intermediate point, then continue to machine home.
  • Pairing with G91 (incremental) and Z0 homes the Z axis straight up with no sideways move.
  • Always retract Z to a safe height before homing X and Y.

Example

G91 G28 Z0 (raise Z to home)
G28 X0 Y0 (home X and Y)
G90 (back to absolute)

Related: work offsets and the G-Code Cheat Sheet.

Scroll to Top

The calculators and tools on Formula Factory are provided for general guidance and informational purposes only. Results are estimates based on standard formulas and the values you enter — they do not constitute professional engineering, electrical, or architectural advice. Always verify calculations with a qualified professional before making decisions for any safety-critical, code-compliance, or commercial application. Formula Factory makes no representations or warranties as to the accuracy or completeness of any result, and accepts no liability for errors, omissions, or any outcomes arising from reliance on this information.