Layout and shop math
Geometry and trigonometry calculators for machinists
Right triangle sides from sin A = opposite / hypotenuse, cos A = adjacent / hypotenuse, tan A = opposite / adjacent; the tools below apply them to layout work.
Technical review pending. Formulas and values are cited. This notice comes down after a machinist review.
Right triangle solver
Hypotenuse c
in
c = sqrt(a^2 + b^2) = sqrt(3.0000^2 + 4.0000^2) = 5.0000 in
5.0000 in (127.00 mm). Angle A 36.8699°, angle B 53.1301°.
| Value | Result | Formula with your numbers |
|---|---|---|
| Side a, opposite A | 3.0000 in | Given |
| Side b, adjacent to A | 4.0000 in | Given |
| Hypotenuse c | 5.0000 in | c = sqrt(a^2 + b^2) = sqrt(3.0000^2 + 4.0000^2) = 5.0000 in |
| Angle A | 36.8699° | A = atan(a / b) = atan(3.0000 / 4.0000) = 36.8699° |
| Angle B | 53.1301° | B = 90° - A = 90° - 36.8699° = 53.1301° |
Source: Machinery's Handbook (trigonometry; solution of triangles)
Right triangle formulas
sin A = a / c; cos A = b / c; tan A = a / b; B = 90° - A
| Symbol | Meaning | Unit |
|---|---|---|
| a | Side opposite angle A | in or mm |
| b | Side adjacent to angle A | in or mm |
| c | Hypotenuse, across from the 90° corner | in or mm |
| A, B | The two acute angles | ° |
Layout and trig tools
Most layout math on a mill or lathe comes back to a right triangle or a circle. A pattern of holes on a circle goes through the bolt circle calculator; an arc you can measure goes through the circle segment calculator; hex and square stock sizes come from the across corners calculator.
- Bolt circle calculator Calculator X and Y for every hole on a bolt circle, as a table for the DRO.
- Circle center from 3 points Calculator Center and radius from three points picked up on the DRO.
- Circle segment calculator Calculator Radius from a chord and height, or the depth of a flat on round bar.
- Hex, square and octagon across corners Calculator Across corners of hex, square and octagon stock, and the round bar to mill it from.
- Degrees to decimal degrees Calculator Degrees, minutes and seconds to decimal degrees and radians.
- Sine bar calculator Calculator Gage block stack height for any angle on a sine bar.
- Taper calculator Calculator Taper angles and dimensions.
- Measuring dovetails with pins Calculator Measuring dovetails over pins.
- Right triangle solutions Coming
- Hole location calculator Coming
- Area calculators Coming
- Metric conversions for machinists Coming
How to choose
Start from what you can measure on the part or read off the drawing. Three DRO points on a bore call for the circle center calculator; a drawing angle in degrees, minutes and seconds goes through the degree converter first, then onto the sine bar calculator if it gets set up on the surface plate. The calculators work in inch or metric and show the formula with your numbers, so you can check the result against the drawing before you key it into the DRO.
Worked example: hole offset from two legs
A hole sits 3.000 in over in Y (side a) and 4.000 in over in X (side b) from the datum corner.
- c = sqrt(3.000^2 + 4.000^2) = sqrt(9.000 + 16.000) = sqrt(25.000) = 5.0000 in.
- A = atan(3.000 / 4.000) = atan(0.75) = 36.8699°.
- B = 90° - 36.8699° = 53.1301°.
Result: 5.0000 in (127.00 mm) center distance, at 36.8699° from the X axis.
Worked example: hole on a radius at 30°
A hole sits on a 5.000 in radius (the hypotenuse) at 30° from the X axis.
- a = 5.000 x sin(30°) = 5.000 x 0.50000 = 2.5000 in (Y).
- b = 5.000 x cos(30°) = 5.000 x 0.86603 = 4.3301 in (X).
Result: X 4.3301 in, Y 2.5000 in from the center. The same math sets a 30° chamfer leg or hole offset.
Common mistakes
- Mixing up a and b. Side a is opposite angle A; side b touches it.
- A pocket calculator left in radians. sin(30) in radians is -0.9880, not 0.5000.
- Entering D-M-S as a decimal: 30° 30' is 30.5°, not 30.30°.
FAQ
How do you find hole coordinates on a bolt circle?
X = r x cos(angle), Y = r x sin(angle), with r the bolt circle radius. For 6 holes on a 4.000 in circle centered at 0, 0, the first hole at 0° is at (2.0000, 0) in.
How do you find a bolt circle diameter from an existing part?
Measure center to center across two adjacent holes and divide by sin(180° / N). Six holes 2.000 in apart give 2.000 / 0.5 = 4.000 in.
What is the distance across the corners of a 3/4 in hex?
0.866 in: 0.750 x 1.1547, for sharp corners.
How long is the hypotenuse of a 3 by 4 triangle?
5.000 in for sides of 3.000 in and 4.000 in: sqrt(9 + 16) = 5.000. Angle A opposite the 3.000 in side is 36.8699°.
Last updated