Layout and shop math

Hole location calculator: rows, grids and polar coordinates

X = X0 + i x s x cos(A), Y = Y0 + i x s x sin(A); five holes 0.750 in apart on a 30° line end at X 2.5981 in, Y 1.5000 in.

Technical review pending. Formulas and values are cited. This notice comes down after a machinist review.

Units
in
in
holes

2 to 200

in
°

Counterclockwise from +X (3 o’clock); negative for clockwise. Decimal degrees or D M S, like 35 30 15.

Switches to 3 for mm.

Hole coordinates
HoleX (in)Y (in)X incremental (in)Y incremental (in)
10.00000.00000.00000.0000
20.64950.37500.64950.3750
31.29900.75000.64950.3750
41.94861.12500.64950.3750
52.59811.50000.64950.3750

Incremental = this hole minus the previous hole; hole 1 is measured from the start or reference point.

Holes 1 and 2, with your numbers:

X = X0 + i x s x cos(A) = 0 + 0 x 0.75 x cos(30°) = 0.0000 in

Y = Y0 + i x s x sin(A) = 0 + 0 x 0.75 x sin(30°) = 0.0000 in

X = X0 + i x s x cos(A) = 0 + 1 x 0.75 x cos(30°) = 0.6495 in

Y = Y0 + i x s x sin(A) = 0 + 1 x 0.75 x sin(30°) = 0.3750 in

Last hole (hole 5): X, Y

2.5981, 1.5000 in

X = X0 + i x s x cos(A) = 0 + 4 x 0.75 x cos(30°) = 2.5981 in

Y = Y0 + i x s x sin(A) = 0 + 4 x 0.75 x sin(30°) = 1.5000 in. First to last: 4 x 0.75 = 3.0000 in along the line.

Step between holes: dX, dY

0.6495, 0.3750 in

dX = s x cos(A) = 0.75 x cos(30°) = 0.6495 in

dY = s x sin(A) = 0.75 x sin(30°) = 0.3750 in. Key the absolute coordinates; rounded steps add up.

Source: Machinery's Handbook (hole coordinates); plane trigonometry and coordinate rotation as shown.

Coordinates are only as good as the zero they start from. Check the first hole and the last hole against the drawing before drilling.

How it works

Row of holes

X = X0 + i x s x cos(A); Y = Y0 + i x s x sin(A); s = L / (N - 1)

Symbol key
SymbolMeaningUnit
X0, Y0First holein or mm
NNumber of holesholes
iHole index from 0 (hole 1 is i = 0)none
sCenter-to-center spacingin or mm
LFirst-to-last lengthin or mm
AAngle from +X, counterclockwise°

Grid with rotation

u = (c - 1) x sx; v = (r - 1) x sy; X = X0 + u x cos(phi) - v x sin(phi); Y = Y0 + u x sin(phi) + v x cos(phi)

Symbol key
SymbolMeaningUnit
R, CRows and columnscount
r, cRow and column of a hole, from 1none
sx, syX and Y spacing before rotationin or mm
u, vHole position in the unrotated gridin or mm
phiGrid rotation about hole 1, counterclockwise°

Polar and reverse

X = Xr + R x cos(A); Y = Yr + R x sin(A); R = sqrt(dX^2 + dY^2); A = atan2(dY, dX)

Symbol key
SymbolMeaningUnit
Xr, YrReference pointin or mm
RRadius from the referencein or mm
dX, dYHole minus reference, X and Yin or mm
AAngle from +X, counterclockwise, shown 0 to 360°°

Incremental columns come from the unrounded absolute values, then round for display. Holes spaced evenly on a circle come from the bolt circle calculator instead.

Worked example: row of 5 holes at 30°

5 holes, 0.750 in spacing, 30°, start X 0, Y 0.

  1. cos 30° = 0.866025; sin 30° = 0.500000. Step: dX = 0.750 x 0.866025 = 0.6495 in (0.649519); dY = 0.750 x 0.5 = 0.3750 in.
  2. Hole 1: X 0.0000, Y 0.0000 | incr 0.0000, 0.0000.
  3. Hole 2: X 0.6495, Y 0.3750 | incr 0.6495, 0.3750.
  4. Hole 3: X 1.2990, Y 0.7500 | incr 0.6495, 0.3750.
  5. Hole 4: X 1.9486, Y 1.1250 | incr 0.6495, 0.3750.
  6. Hole 5: X 2.5981, Y 1.5000 | incr 0.6495, 0.3750.
  7. Check: first to last is 4 x 0.750 = 3.000 in along the line; 3.000 x cos 30° = 2.5981 in, 3.000 x sin 30° = 1.5000 in.
  8. Four rounded increments of 0.6495 add to 2.5980, not 2.5981 (2.598076 raw); the gap already shows at hole 4, 1.9485 against 1.9486. Absolute coordinates are the safer DRO entry.

Result (in): hole 5 at X 2.5981, Y 1.5000.

Worked example: 3 x 4 grid rotated 15°, metric

3 rows x 4 columns, sx 20 mm, sy 25 mm, rotated 15° about hole 1 at X 0, Y 0, row by row.

  1. cos 15° = 0.965926; sin 15° = 0.258819. Along a row: dX = 20 x 0.965926 = 19.319 mm, dY = 20 x 0.258819 = 5.176 mm. Row start shift: -25 x 0.258819 = -6.470 mm in X, 25 x 0.965926 = 24.148 mm in Y.
  2. Hole 1 (r1 c1): 0.000, 0.000 | incr 0.000, 0.000.
  3. Hole 2 (r1 c2): 19.319, 5.176 | incr 19.319, 5.176.
  4. Hole 3 (r1 c3): 38.637, 10.353 | incr 19.319, 5.176.
  5. Hole 4 (r1 c4): 57.956, 15.529 | incr 19.319, 5.176.
  6. Hole 5 (r2 c1): -6.470, 24.148 | incr -64.426, 8.619.
  7. Hole 6 (r2 c2): 12.848, 29.325 | incr 19.319, 5.176.
  8. Hole 7 (r2 c3): 32.167, 34.501 | incr 19.319, 5.176.
  9. Hole 8 (r2 c4): 51.485, 39.677 | incr 19.319, 5.176.
  10. Hole 9 (r3 c1): -12.941, 48.296 | incr -64.426, 8.619.
  11. Hole 10 (r3 c2): 6.378, 53.473 | incr 19.319, 5.176.
  12. Hole 11 (r3 c3): 25.696, 58.649 | incr 19.319, 5.176.
  13. Hole 12 (r3 c4): 45.015, 63.825 | incr 19.319, 5.176.
  14. Check: hole 12 is u 60, v 50 from hole 1; sqrt(45.015^2 + 63.825^2) = 78.102 mm = sqrt(60^2 + 50^2), so the rotation kept the spacing.

Result (mm): hole 12 at X 45.015, Y 63.825.

Worked example: polar and reverse

R 2.000 in at 35° from X 0, Y 0; then a hole at X 1.2500, Y -0.7500 in back to radius and angle.

  1. Polar: X = 2.000 x 0.819152 = 1.6383 in; Y = 2.000 x 0.573576 = 1.1472 in.
  2. Reverse: R = sqrt(1.5625 + 0.5625) = sqrt(2.1250) = 1.4577 in.
  3. A = atan2(-0.7500, 1.2500) = -30.9638°, shown 329.0362° (329° 2' 10").

Result: X 1.6383, Y 1.1472 in; 1.4577 in at 329.0362°.

Shop notes

  • Key absolute coordinates into the DRO or program where you can. Rounded increments add up; in the row example four increments of 0.6495 in land 0.0001 in short of hole 5.
  • Set the DRO zero on hole 1 (or the reference) and keep it; every row in the table reads from that zero.
  • On a manual mill, approach every hole from the same direction to keep backlash out of the handwheel dials; the DRO reads the table directly, the dials do not.
  • Angles run counterclockwise from +X (3 o’clock), as on the bolt circle calculator. For a clockwise angle, enter it negative.

FAQ

How do you lay out holes in a line at an angle?

Step each hole by s x cos(A) in X and s x sin(A) in Y. At 0.750 in and 30° that is 0.6495 in and 0.3750 in per hole.

Where is the fifth hole of a 0.750 in, 30° row?

X 2.5981 in, Y 1.5000 in from hole 1: 3.000 in along the line.

How do you rotate a hole pattern?

X = X0 + u x cos(phi) - v x sin(phi); Y = Y0 + u x sin(phi) + v x cos(phi). Hole 2 of a 20 mm grid rotated 15° lands at X 19.319 mm, Y 5.176 mm.

Absolute or incremental for a DRO?

Absolute: each hole reads from one zero, so rounding cannot stack. Incremental columns are there to check the step.

How do you convert X and Y to radius and angle?

R = sqrt(dX^2 + dY^2) and A = atan2(dY, dX). X 1.2500 in, Y -0.7500 in is 1.4577 in at 329.0362°.

Holes on a circle?

Use the bolt circle calculator; it spaces N holes evenly on the circle.

Last updated