Trigonometry

Trigonometry for Carpenters

Last updated: March 2026 · Intermediate
Before you start

You should be comfortable with:

Real-world applications
📐
Carpentry

Measurements, material estimation, cutting calculations

Carpenters use trigonometry constantly, whether they realize it or not. Every time you calculate a rafter length from a roof pitch, lay out a stair stringer, set a miter saw to cut an angled joint, or check a wall for square with diagonal measurements, you are working with the same right-triangle relationships — sine, cosine, and tangent — that appear in a math textbook. The difference is that on a job site, the stakes are real: a wrong angle means wasted lumber, a bad rafter calculation means a roof that does not fit, and a stringer error means stairs that are not to code.

This page connects the trig you have learned to the specific calculations carpenters perform every day.

Roof Pitch and Rafter Calculations

Roof pitch is the most common place carpenters encounter trigonometry. Pitch is expressed as a ratio of rise over run — how many inches the roof rises for every 12 inches of horizontal run. A 6/12 pitch means the roof rises 6 inches for every 12 inches of run.

That ratio is exactly the tangent of the pitch angle:

pitch angle=arctan ⁣(riserun)\text{pitch angle} = \arctan\!\left(\frac{\text{rise}}{\text{run}}\right)

Once you know the angle, you can find the rafter length (the hypotenuse of the right triangle formed by the rise, run, and rafter):

rafter length=runcos(pitch angle)\text{rafter length} = \frac{\text{run}}{\cos(\text{pitch angle})}

Roof Cross-Section — Rise, Run, and Rafter

pitch angleRunRiseRafterwall plateridge

Worked Example: 6/12 Pitch, 14-ft Run

A roof has a 6/12 pitch and a horizontal run of 14 feet from the wall plate to the ridge. Find the pitch angle, rafter length, and total rise.

Step 1 — Find the pitch angle:

θ=arctan ⁣(612)=arctan(0.5)26.57°\theta = \arctan\!\left(\frac{6}{12}\right) = \arctan(0.5) \approx 26.57°

Step 2 — Find the rafter length:

rafter=14cos(26.57°)140.894415.65 ft\text{rafter} = \frac{14}{\cos(26.57°)} \approx \frac{14}{0.8944} \approx 15.65 \text{ ft}

Step 3 — Find the rise:

rise=14×tan(26.57°)=14×0.5=7 ft\text{rise} = 14 \times \tan(26.57°) = 14 \times 0.5 = 7 \text{ ft}

The rafter length to the wall plate is 15.65 ft. After adding 12 to 24 inches for the eave overhang, the total exceeds 16 feet, so the carpenter would order 18-foot rafter stock.

Common Roof Pitch Quick Reference

PitchAngleRise per Foot of Run
3/1214.04°3 in
4/1218.43°4 in
5/1222.62°5 in
6/1226.57°6 in
8/1233.69°8 in
10/1239.81°10 in
12/1245.00°12 in

A 12/12 pitch is a 45-degree roof — equal rise and run. Most residential roofs fall between 4/12 and 8/12.

Stair Stringer Layout

Stair stringers follow the same right-triangle math as rafters, just tilted to a steeper angle. Building codes specify acceptable rise-per-step (typically 7 to 7.75 inches) and run-per-step (typically 10 to 11 inches). The stringer is the hypotenuse.

Worked Example: 9-ft Total Rise, 12 Steps

A staircase must climb a total rise of 9 feet (108 inches). The plan calls for 12 steps with a 10-inch run per step.

Step 1 — Rise per step:

rise per step=10812=9 in\text{rise per step} = \frac{108}{12} = 9 \text{ in}

Step 2 — Stringer angle:

θ=arctan ⁣(910)=arctan(0.9)41.99°\theta = \arctan\!\left(\frac{9}{10}\right) = \arctan(0.9) \approx 41.99°

Step 3 — Total stringer length:

The total run is 12×10=12012 \times 10 = 120 inches. The total rise is 108 inches.

stringer length=1082+1202=11,664+14,400=26,064161.44 in13.45 ft\text{stringer length} = \sqrt{108^2 + 120^2} = \sqrt{11{,}664 + 14{,}400} = \sqrt{26{,}064} \approx 161.44 \text{ in} \approx 13.45 \text{ ft}

You can verify with the trig approach: 108/sin(41.99°)108/0.6690161.43108 / \sin(41.99°) \approx 108 / 0.6690 \approx 161.43 in — the same result, within rounding.

The carpenter marks the rise and run for each step along the stringer board using a framing square, but knowing the total stringer length tells you what length of lumber to start with.

Miter and Bevel Angles

When trim pieces meet at a corner, each piece gets a miter cut — an angled cut that splits the joint angle equally between the two pieces. For a standard 90-degree inside or outside corner, the miter angle is 45 degrees, which is why 45 degrees is the most-used setting on a miter saw.

For non-90-degree joints, or for polygon frames, the formula is:

miter angle=180°n\text{miter angle} = \frac{180°}{n}

where nn is the number of sides of the polygon. This works because the exterior angles of any polygon sum to 360 degrees, and each joint splits its exterior angle between two pieces.

ShapeSides (nn)Miter Angle
Square445.0°
Pentagon536.0°
Hexagon630.0°
Octagon822.5°

Compound Miters

Things get more complex with compound miter cuts, which involve both a miter angle (rotation in the horizontal plane) and a bevel angle (tilt of the blade). Crown molding on a non-90-degree wall is the classic example. The formulas for a compound miter involve both the wall angle and the spring angle (the angle the molding leans away from the wall). For standard 90-degree corners with 38-degree spring-angle crown, the miter is 31.6 degrees and the bevel is 33.9 degrees. For non-standard wall angles, carpenters either use compound miter tables or calculate the angles with trigonometry.

Squaring with Diagonals

Before nailing off a wall frame, deck frame, or concrete form, carpenters check for square by measuring the diagonals. If the two diagonals of a rectangle are equal, the corners are 90 degrees. The expected diagonal length comes from the Pythagorean theorem:

diagonal=length2+width2\text{diagonal} = \sqrt{\text{length}^2 + \text{width}^2}

The classic shortcut is the 3-4-5 rule: if one side is 3 feet, the adjacent side is 4 feet, and the diagonal is 5 feet, the corner is square. Multiples work too — 6-8-10, 9-12-15, 12-16-20.

You can also find the diagonal angle if needed:

θ=arctan ⁣(widthlength)\theta = \arctan\!\left(\frac{\text{width}}{\text{length}}\right)

For a 12 ft by 16 ft deck: diagonal =144+256=400=20= \sqrt{144 + 256} = \sqrt{400} = 20 ft exactly (this is a 3-4-5 multiple: 3×4=123 \times 4 = 12, 4×4=164 \times 4 = 16, 5×4=205 \times 4 = 20). If your tape reads anything other than 20 feet across the diagonal, the frame is not square and needs to be racked until both diagonals match.

Common Mistakes

  1. Confusing pitch ratio with the actual angle. A 6/12 pitch is not a 30-degree roof — it is 26.57 degrees. The pitch ratio is rise/run (tangent), not a direct angle measurement. Always use arctan(rise/run)\arctan(\text{rise}/\text{run}) to convert.

  2. Forgetting to add overhang to the rafter calculation. The rafter length from wall plate to ridge is only part of the total board. The eave overhang (soffit) extends beyond the wall and must be added to determine the lumber length you need to order.

  3. Mixing up total rise and per-step rise. In stair layout, the total rise is the floor-to-floor height. The per-step rise is the total divided by the number of steps. Using the total rise where the per-step rise belongs (or vice versa) produces a wildly wrong stringer angle.

  4. Ignoring the ridge board thickness. The ridge board (typically 1.5 inches for dimensional lumber) sits between the two opposing rafters. Each rafter’s run is shortened by half the ridge board thickness — usually 0.75 inches. On long runs this is negligible, but on short runs or precise work it matters.

Practice Problems

Test your understanding with these problems. Click to reveal each answer.

Problem 1: A roof has an 8/12 pitch and a run of 16 feet. Find the pitch angle, rafter length, and rise.

Pitch angle:

θ=arctan ⁣(812)arctan(0.6667)33.69°\theta = \arctan\!\left(\frac{8}{12}\right) \approx \arctan(0.6667) \approx 33.69°

Rafter length:

rafter=16cos(33.69°)160.832119.23 ft\text{rafter} = \frac{16}{\cos(33.69°)} \approx \frac{16}{0.8321} \approx 19.23 \text{ ft}

Rise:

rise=16×tan(33.69°)16×0.6667=10.67 ft\text{rise} = 16 \times \tan(33.69°) \approx 16 \times 0.6667 = 10.67 \text{ ft}

Check: 162+10.672256+113.85=369.8519.23\sqrt{16^2 + 10.67^2} \approx \sqrt{256 + 113.85} = \sqrt{369.85} \approx 19.23 ft. Correct within rounding.

Problem 2: A staircase has a total rise of 8.5 feet (102 inches), 11 steps, and a run of 10.5 inches per step. Find the stringer angle.

Rise per step:

102119.27 in\frac{102}{11} \approx 9.27 \text{ in}

Stringer angle:

θ=arctan ⁣(9.2710.5)arctan(0.8829)41.45°\theta = \arctan\!\left(\frac{9.27}{10.5}\right) \approx \arctan(0.8829) \approx 41.45°

Problem 3: You are building a regular octagonal frame (8 sides). What miter angle do you set on the saw?

miter angle=180°8=22.5°\text{miter angle} = \frac{180°}{8} = 22.5°

Set the miter saw to 22.5 degrees off square. Each of the 8 joints has two pieces meeting, each cut at 22.5 degrees, for a total joint angle of 45 degrees — which is the exterior angle of a regular octagon.

Problem 4: A deck measures 12 ft by 16 ft. What should the diagonal measure to confirm the frame is square?

diagonal=122+162=144+256=400=20.00 ft\text{diagonal} = \sqrt{12^2 + 16^2} = \sqrt{144 + 256} = \sqrt{400} = 20.00 \text{ ft}

Both diagonals should measure exactly 20 feet. This is a 3-4-5 triple scaled by 4.

Problem 5: A roof has a pitch angle of 33.69 degrees. What is the pitch expressed as a ratio over 12?

The pitch ratio is rise/run, which is the tangent of the pitch angle:

tan(33.69°)0.6667=812\tan(33.69°) \approx 0.6667 = \frac{8}{12}

The roof has an 8/12 pitch — it rises 8 inches for every 12 inches of horizontal run.

Key Takeaways

  • Pitch is tangent. A roof pitch of rise/run is the tangent of the pitch angle. Convert with θ=arctan(rise/run)\theta = \arctan(\text{rise}/\text{run}).
  • Rafter length is run divided by cosine. Or equivalently, rafter=rise2+run2\text{rafter} = \sqrt{\text{rise}^2 + \text{run}^2}.
  • Stair stringers use the same math — rise and run per step determine the angle, and the Pythagorean theorem gives the stringer length.
  • Miter angle for a regular polygon is 180°/n180°/n where nn is the number of sides.
  • Diagonal squaring uses the Pythagorean theorem. Equal diagonals confirm 90-degree corners.
  • Every one of these calculations is a right triangle problem — the same SOH CAH TOA you already know.

Return to Trigonometry for more topics in this section.

Last updated: March 28, 2026