Pro Calculators and Guides

Bolt Circle Coordinates: How to Lay Out a PCD Hole Pattern and G-code

Find X and Y coordinates for holes on a pitch circle, draw the pattern, write G81 or G83 drilling code and work out a PCD from measurements.

Saizul Amin
Saizul Amin19 Nov 2026 · 4 min read
Bolt Circle Coordinates: How to Lay Out a PCD Hole Pattern and G-code

Bolt Circle Coordinates: How to Lay Out a PCD Hole Pattern and G-code

Holes on a circle are everywhere in mechanical work: flanges, hubs, motor faces, covers and fixtures. Drilling them accurately on a manual mill or a CNC machine starts with one thing, the X and Y position of every hole. The free Bolt Circle and PCD Hole Pattern Calculator gives you those coordinates, a drawing, a drilling program and CAD output.

The geometry

A bolt circle is described by the number of holes and the pitch circle diameter, the circle that passes through the hole centres. On a drawing it reads like 6 × Ø9 on PCD 100. If the holes are evenly spaced, each one is 360 / n degrees from the next. The position of a hole at angle θ is X = cx + r cos θ and Y = cy + r sin θ, where r is half the PCD and cx, cy is the centre.

Setting up a pattern

Enter the number of holes, the PCD and the hole diameter. The start angle sets where the first hole sits, measured from the +X axis; a pattern that straddles the centre lines, as most flanges do, starts at half the spacing. Choose anticlockwise or clockwise numbering to match your drawing. If the pattern is not at the origin of your work coordinates, enter the centre X and Y.

Some parts have holes on only part of a circle. Set the arc span below 360 degrees, and the first and last holes sit on the ends of the arc with the rest evenly between them.

A project can hold several patterns, for example an outer bolt circle and an inner ring of tapped holes. Each gets its own colour on the drawing and its own name in the table.

Checking the layout

Below the inputs you see the angle between holes, the centre distance between neighbouring holes (the chord, PCD × sin(180° / n)) and the clear material between holes. If the holes would overlap, you get a warning. The drawing shows each pitch circle and numbers every hole, and the coordinate table lists them all.

A worked example

Six 9 mm holes on a 100 mm PCD starting at 0° sit at (50, 0), (25, 43.301), (−25, 43.301), (−50, 0), (−25, −43.301) and (25, −43.301). Neighbouring holes are 50 mm apart, leaving 41 mm between them. Four 5.5 mm holes on a 40 mm PCD starting at 45° sit at plus or minus 14.142 mm in both X and Y.

Writing the drilling program

The G-code tab produces a ready-to-read program. It sets metric or inch units and absolute positioning, calls the tool and starts the spindle, moves to a safe height, then runs a G81 drilling cycle, or a G83 peck cycle for deeper holes, at every hole of every pattern, with your retract plane, depth, feed and peck depth. It ends with G80, a retract and program end. Save it as an .nc file or copy it to the clipboard.

Controllers differ in the details of canned cycles. Read the program against your machine manual, set your work offsets and tool lengths, and dry-run it before you cut.

Finding the PCD of an existing part

To match a part you already have, measure the centre distance between two neighbouring holes and the PCD is that distance divided by sin(180° / n). For an even number of holes you can instead measure across the outside edges of two opposite holes and subtract one hole diameter. For an odd number, divide that by cos(90° / n). A five-stud wheel with 58.78 mm between neighbouring studs has a PCD of 100 mm. Send the result straight to a pattern.

Exports

Print a hole chart with the drawing and coordinate table, save the drawing as SVG or PNG, export coordinates as CSV or the holes and pitch circles as a DXF for CAD and CAM.

Scope

The calculator handles geometry and a starting program. It does not size bolts, choose tolerances or know your machine, so treat the program as a draft to be checked, not a proven routine.

Completely freeNo cost, no sign-up
Files stay privateEverything runs in your browser
Easy in your languageAvailable in many languages