---
title: "G81 vs G83: Drilling Canned Cycles Explained"
description: "G81 is a simple drill cycle and G83 is a peck drill cycle for deep holes. Here is how canned cycles work, their R, Z, and Q words, and when to use each."
url: https://gcodepractice.com/journal/g81-vs-g83-drilling-canned-cycles/
canonical: https://gcodepractice.com/journal/g81-vs-g83-drilling-canned-cycles/
author: "Lawrence Arya"
authorUrl: https://www.linkedin.com/in/vibecoding/
published: 2026-06-04
updated: 2026-06-04
category: "Code reference"
tags: ["g-code", "g81", "g83", "drilling", "canned-cycle", "beginner"]
lang: en
---

# G81 vs G83: Drilling Canned Cycles Explained

> **TL;DR** G81 is a simple drilling cycle: rapid to the hole, feed to depth, retract. G83 is a peck drilling cycle: it drills in Q-sized steps and fully retracts between them to clear chips, which is what deep holes need. Both are modal, so each later hole is just an X Y position, and G80 cancels the cycle.

Drilling a row of holes is the same three moves over and over: rapid to the hole, feed down, retract. A **canned cycle** packs that whole sequence into one modal line so you do not repeat it for every hole. `G81` and `G83` are the two you will use most.

## What a canned cycle does

Instead of writing a rapid, a feed, and a retract for each hole, you call a cycle once with its parameters, then list the hole positions. The control runs the full sequence at every `X Y` until you cancel it. (New to the idea entirely? The [what-is-a-canned-cycle overview](/journal/what-is-a-canned-cycle-in-cnc/) introduces the whole concept before this G81-versus-G83 comparison.) Because the cycle is **modal**, that single setup line drives an entire bolt pattern. The cycles are defined in the [LinuxCNC canned-cycle reference](https://linuxcnc.org/docs/html/gcode/g-code.html), and the modal behavior is the same idea as [modal vs non-modal G-codes](/journal/modal-vs-non-modal-g-codes/) elsewhere in the language.

## G81: the simple drill cycle

`G81` is the most basic cycle. For each hole it rapids to the `R` plane, feeds to the final `Z` depth in one pass, then retracts. It is the right choice for shallow holes where chips clear on their own. The [G81 cycle reference](https://www.helmancnc.com/cnc-g81-drilling-cycle/) shows the standard form:

```
G81 G99 X10. Y10. Z-15. R2. F100   (drill the first hole)
X30. Y10.                          (second hole, same cycle)
X50. Y10.                          (third hole)
G80                                (cancel the cycle)
```

The parameters appear once. Each later line is just a position, and `G80` ends the cycle.

## G83: peck drilling for deep holes

`G83` adds chip clearing. Instead of one plunge, it drills down by the peck increment `Q`, then **fully retracts to the R plane** to pull the chips out, then plunges back to continue. It repeats until it reaches `Z`. That full retract is what deep holes need: without it, chips pack the flutes and break the drill. The [G83 peck cycle reference](https://www.helmancnc.com/g83-peck-drilling-cycle-for-deep-holes/) gives the form, which just adds `Q`:

```
G83 G99 X10. Y10. Z-40. Q5. R2. F80
```

A common rule of thumb is to switch from `G81` to a peck cycle once the hole is roughly three or more times deeper than its diameter.

## G81, G83, and the related cycles

The drilling family shares one grammar and differs in what happens at the bottom (and some controls extend the cycle idea sideways: Haas's [G12/G13 circular pocket cycles](/journal/g12-and-g13-circular-pocket-milling-haas/) apply the same one-block thinking to round pockets):

| Cycle | What it does | Best for |
| --- | --- | --- |
| `G81` | Feed to depth, retract | Shallow through-holes |
| `G82` | Feed to depth, dwell (`P`), retract | Flat-bottom holes, counterbores |
| `G83` | Peck with full retract each step (`Q`) | Deep holes, chip clearing |
| `G73` | High-speed peck, small retract (`Q`) | Deep holes, faster, lighter clearing |
| `G80` | Cancel the active cycle | Ending any cycle |

## The R plane and the return modes

Two more words shape the cycle. `R` is the **retract plane**, a clearance height just above the part where the motion changes from rapid to feed, so the drill does not slam into the surface. `G98` and `G99` choose where the tool returns between holes:

| Code | Returns to | Use when |
| --- | --- | --- |
| `G98` | The initial Z level | There are clamps or steps to clear between holes |
| `G99` | The `R` plane | The path between holes is clear (faster) |

The cycle replaces the manual [G00 rapid and G01 feed](/journal/g00-vs-g01/) moves you would otherwise write by hand, and the depths are measured from the active [G54 work offset](/journal/g54-work-offsets-explained/), so the part must be set up correctly first. These are exactly the lines you learn to recognize when you [read a CNC program](/journal/how-to-read-a-cnc-program-for-beginners/), which is why the drill cycles belong on every list of [common G-codes for CNC beginners](/journal/common-g-codes-for-cnc-beginners/).

## Bottom line

`G81` drills straight to depth and retracts; `G83` pecks in `Q` steps with a full retract each time to clear chips on deep holes. Both are modal, so each later hole is just an `X Y` position, and `G80` cancels the cycle. Set `Z` for depth, `R` for the clearance plane, and pick `G98` or `G99` for the return height.

## Sources

- [LinuxCNC G-code reference (G81, G83, G80 cycles)](https://linuxcnc.org/docs/html/gcode/g-code.html)
- [HelmanCNC: G81 drilling cycle](https://www.helmancnc.com/cnc-g81-drilling-cycle/)
- [HelmanCNC: G83 peck drilling cycle for deep holes](https://www.helmancnc.com/g83-peck-drilling-cycle-for-deep-holes/)

## Frequently asked questions

### What is the difference between G81 and G83?
`G81` feeds straight to the final depth in one pass, then retracts. `G83` drills in increments set by `Q` and fully retracts to the `R` plane between each peck to clear chips. Use `G81` for shallow holes and `G83` for deep ones.

### What do the R, Z, and Q words mean in a drill cycle?
`Z` is the final depth, `R` is the retract plane where rapid changes to feed, and `Q` is the peck increment used by `G83` and `G73`. `F` is the feedrate.

### How do you cancel a canned cycle?
`G80` cancels any active canned cycle. Because cycles are modal, the machine keeps drilling at every new `X Y` until you call `G80`.

### What is the best way to learn canned cycles like G81 and G83?
Drill the codes with active recall. A free app like G-Code Sprint quizzes `G81`, `G83`, and the rest of the everyday codes as quick timed questions and repeats whichever ones you miss.

*G-Code Sprint is a study and practice tool only. Always follow your instructor, employer, machine manual, and shop safety procedures.*

---

Source: https://gcodepractice.com/journal/g81-vs-g83-drilling-canned-cycles/
Author: Lawrence Arya — https://www.linkedin.com/in/vibecoding/
