---
title: G20, G21, G70, G71 (Length Units)
slug: g20-g21-g70-g71-length-units
docTags: 
createdAt: 2023-04-18T09:28:38.000Z
---

Program `G20` to use inches for length units. Program `G21` to use millimeters.&#x20;

It is usually a good idea to program either `G20` or `G21` near the beginning of a program before any motion occurs, and not to use either one anywhere else in the program. It is the responsibility of the user to be sure all numbers are appropriate for use with the current length units. `G70` and `G71` are added for CAM software compatibility.
