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 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:

LetterIts laneExample
GPreparatory functions: how to interpret what followsG01, G90, G54
MMiscellaneous functions: machine switchesM03, M08, M30
X, Y, ZPosition wordsX50.0 Z-2.5
FFeed rateF200
SSpindle speedS2000
TTool selectionT0101
NBlock numbers, labels for humans and jumpsN140

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 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 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 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.

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. 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 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

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.