---
title: "What Does the G in G-Code Stand For, Actually?"
description: "Officially the G is the address for preparatory functions; informally everyone says geometric. The real story is the word-address format both answers sit in."
url: https://gcodepractice.com/journal/what-does-the-g-in-g-code-stand-for-actually/
canonical: https://gcodepractice.com/journal/what-does-the-g-in-g-code-stand-for-actually/
author: "Lawrence Arya"
authorUrl: https://www.linkedin.com/in/vibecoding/
published: 2026-06-07
updated: 2026-06-07
category: "Guides"
tags: ["g-code", "history", "terminology"]
lang: en
---

# What Does the G in G-Code Stand For, Actually?

> **TL;DR** The G in G-code is, formally, just the letter address assigned to preparatory functions in the RS-274 word-address format: a G word prepares the control by setting how the following words should be interpreted. The popular answer, that G stands for geometric, is a reasonable gloss because most G words govern geometry and motion, but the standard never spells it out as an abbreviation. The durable takeaway is the format itself: every letter in a program owns one lane of meaning, and G's lane is preparation.

Two answers circulate, and the honest one comes first: formally, the G in G-code does not abbreviate anything. In the RS-274 standard that [G-code](https://en.wikipedia.org/wiki/G-code) descends from, G is simply the letter address assigned to preparatory functions, the words that prepare the control to interpret everything else in the block. The popular answer, that G stands for geometric, is a reasonable gloss you will hear in every shop, because most G words do govern geometry and motion. But the standard defines the letter by its function, not by a word it shortens.

## What "preparatory" really means

A G word changes the control's mind before anything moves. G01 prepares it to treat the coordinates that follow as a straight cutting move. G20 prepares it to read every number as inches. G90 prepares it to read positions as absolute rather than relative. The G word sets the interpretation rules; the X, Y, Z, and F words then play by those rules. That is why a block like G01 X50 F200 is one sentence rather than three fragments: the G word told the control what kind of sentence it was about to hear.

This is also why G words dominate the start of well-written programs. A safety line like G17 G21 G90 G40 cuts no metal; it stacks four preparations so that nothing later is interpreted under a leftover rule from the previous program.

## Every letter owns a lane

The deeper structure the question opens up is the word-address format, and it is the genuinely useful thing to take away. Each letter in a program owns exactly one lane of meaning:

| Letter | Its lane | Example |
| --- | --- | --- |
| G | Preparatory functions: how to interpret what follows | G01, G90, G54 |
| M | Miscellaneous functions: machine switches | M03, M08, M30 |
| X, Y, Z | Position words | X50.0 Z-2.5 |
| F | Feed rate | F200 |
| S | Spindle speed | S2000 |
| T | Tool selection | T0101 |
| N | Block numbers, labels for humans and jumps | N140 |

M, for the record, has the same double identity: formally the miscellaneous-function address, informally "machine codes" in half the shops you will visit. Both letters got their reputations honestly, since G words mostly steer geometry and M words mostly throw machine switches, and the [reasons programs still carry N numbers](/journal/why-does-g-code-use-line-numbers-n-codes/) are a story of their own from the same era.

## Where the letters came from

The lanes were drawn in the 1950s and 60s, when numerical control programs lived on [punched paper tape](https://en.wikipedia.org/wiki/Punched_tape) and every character cost physical space. Single-letter addresses with compact numbers were the engineering answer to a real constraint, standardized as RS-274 in the United States and ISO 6983 internationally. The constraint died decades ago; the format survived because it works, and a modern control's documentation, like the [LinuxCNC overview](https://linuxcnc.org/docs/html/gcode/overview.html) of words, blocks, and lines, still describes essentially the same grammar a tape-era programmer would recognize.

That survival is worth a beginner's attention for one practical reason: dialects differ at the edges, but the letter lanes are universal. Whatever machine you ever stand in front of, G will mean preparation and M will mean switches, which is more stability than most computing standards from that era can claim. Whether that makes G-code a real programming language is [its own interesting argument](/journal/is-g-code-a-real-programming-language/).

## Does the etymology matter at the machine?

At the control, not at all: the machine does not care what G evokes for you, only that G01 means feed-move now. What does matter is how fast the preparatory family answers when you read code, because G words are the interpretation layer, and misreading one misreads the whole block, the mechanism walked through in [how a CNC machine reads code step by step](/journal/how-does-a-cnc-machine-read-code-step-by-step/). Etymology is a fine story; instant recall of the two dozen common codes is a working skill, and short daily drills like the free rounds on the [G-code practice page](/g-code-practice/) build that recall in a few weeks of minutes-per-day practice.

So: tell the geometric story at lunch, write preparatory function on the exam, and drill the codes either way.

## Sources

- [Wikipedia: G-code](https://en.wikipedia.org/wiki/G-code)
- [Wikipedia: Punched tape](https://en.wikipedia.org/wiki/Punched_tape)
- [LinuxCNC: G-code overview](https://linuxcnc.org/docs/html/gcode/overview.html)

## Frequently asked questions

### What does the G in G-code stand for, actually?

Formally, nothing as an abbreviation: G is the letter address assigned to preparatory functions in the RS-274 standard, the words that prepare the control to interpret the rest of the block. The widely repeated geometric answer is a reasonable informal gloss, but the standard defines the letter by function.

### Why are G words called preparatory functions?

Because a G word changes the control's interpretation before motion happens: G01 prepares it to treat coordinates as a straight cutting move, G20 prepares it to read numbers as inches, G90 prepares it to read positions as absolute. The G word sets the rules; the coordinate words then play by them.

### Where did G-code originally come from?

From the numerical control work of the 1950s, when programs were punched onto paper tape, and from the standardization that followed as RS-274 in the United States and later ISO 6983 internationally.

### What is a fast way to learn what each G word actually does?

Recall practice beats etymology: drill the common codes in short daily rounds until they produce instant answers. The free G-Code Sprint app runs that loop in 60-second rounds, repeating missed codes until they stick.

---

Source: https://gcodepractice.com/journal/what-does-the-g-in-g-code-stand-for-actually/
Author: Lawrence Arya — https://www.linkedin.com/in/vibecoding/
