Geometry for Carpenters
Measurements, material estimation, cutting calculations
Carpenters use geometry every single day. Squaring walls, calculating rafters, laying out stairs, reading blueprints, and checking whether a frame is true — all of these tasks come down to the same handful of geometric principles. You don’t need to memorize proofs. You need to understand the relationships between lengths, angles, and right triangles well enough to apply them on the job site with a tape measure and a pencil.
This page covers the geometry that matters most in carpentry: the 3-4-5 rule for squaring corners, roof pitch and rafter length calculations, stair layout math, and diagonal checks for rectangular frames.
The 3-4-5 Rule (Squaring Corners)
The most important geometric tool in a carpenter’s kit is the 3-4-5 rule. It comes directly from the Pythagorean theorem and lets you verify that any corner is a true 90-degree angle using nothing but a tape measure.
Here is how it works:
- From the corner, measure 3 feet along one edge and mark the point
- From the same corner, measure 4 feet along the other edge and mark the point
- Measure the diagonal between the two marks
If the diagonal is exactly 5 feet, the corner is square. If the diagonal is longer than 5 feet, the angle is greater than 90 degrees. If it is shorter, the angle is less than 90 degrees.
Why It Works
The numbers 3, 4, and 5 form a Pythagorean triple — three whole numbers that satisfy the Pythagorean theorem:
Because the relationship holds, the triangle with sides 3, 4, and 5 must contain a right angle opposite the longest side.
Scaled Versions
Any multiple of 3-4-5 also works. Larger triangles give more accurate results because small measurement errors have less impact over longer distances.
| Scale | Sides | Verification |
|---|---|---|
| x1 | 3 - 4 - 5 | |
| x2 | 6 - 8 - 10 | |
| x3 | 9 - 12 - 15 | |
| x4 | 12 - 16 - 20 |
Practical tip: Always use the largest triangle that fits your workspace. On a long wall, use 12-16-20 instead of 3-4-5. The math is the same, but you will catch errors that a small triangle would miss.
Roof Pitch and Rafter Length
Roof pitch describes the steepness of a roof as a ratio of vertical rise to horizontal run. A pitch of 6/12 means the roof rises 6 inches for every 12 inches of horizontal run. It is sometimes written as “6-in-12” or expressed as the fraction .
Roof Cross-Section (6/12 Pitch)
Rafter Length Formula
The rafter is the hypotenuse of a right triangle formed by the rise and run. Using the Pythagorean theorem:
Common Rafter Factors
A rafter factor (also called a unit rafter length) tells you the rafter length per foot of run. It simplifies the calculation: just multiply the factor by the total run in feet.
| Pitch | Rise per Foot of Run | Rafter Factor (per ft of run) |
|---|---|---|
| 4/12 | 4 in | |
| 6/12 | 6 in | |
| 8/12 | 8 in | |
| 10/12 | 10 in | |
| 12/12 | 12 in |
To use the table: multiply the rafter factor by the total run in feet. For example, a 6/12 pitch roof with a 14 ft run has a rafter length of ft.
Stair Calculations
Building code-compliant stairs requires precise geometry. The key measurements are total rise (the vertical distance the staircase must cover), riser height (the vertical distance of each step), tread depth (the horizontal depth of each step), and stringer length (the diagonal board that supports the steps).
Step-by-Step Process
Step 1 — Find the number of risers. Divide total rise by the desired riser height (building code typically requires 7 to 7.75 inches):
Round to the nearest whole number, then recalculate the exact riser height:
Step 2 — Find the number of treads. There is always one fewer tread than risers (the top landing counts as the last “step”):
Step 3 — Find the total run. Multiply the number of treads by the tread depth (building code typically requires 10 to 11 inches):
Step 4 — Find the stringer length. The stringer is the hypotenuse:
Checking Diagonals (Is It Square?)
When you build a rectangular frame — a deck, a door opening, a foundation form, or a wall section — you need to verify that it is truly rectangular and not a parallelogram skewed off-square. The method is simple: measure both diagonals and compare.
A rectangle has equal diagonals. If you measure from one corner to the opposite corner and get the same measurement in both directions, the frame is square. If the diagonals are different, the frame is racked and needs adjustment.
This works because a rectangle is defined by having four right angles. Equal diagonals are a consequence of that property. Any quadrilateral with equal diagonals and equal opposite sides is a rectangle.
How to Adjust
If the diagonals are unequal, push the longer diagonal shorter by tapping the frame toward the corner on the long diagonal. Recheck after each adjustment until both measurements match.
Worked Examples
Example 1: Using the 3-4-5 Rule (Scaled to 6-8-10)
A carpenter is framing a deck and needs to verify that the corner is 90 degrees. The deck is large, so the carpenter scales up to 6-8-10 for better accuracy.
Step 1 — Measure 6 feet along one joist from the corner. Mark the point.
Step 2 — Measure 8 feet along the adjacent joist from the corner. Mark the point.
Step 3 — Measure the diagonal between the marks.
Step 4 — Check the math:
If the diagonal is exactly 10 feet, the corner is square. The carpenter measures 10 ft 0.5 in — the corner is slightly out of square and needs adjustment.
Example 2: Rafter Length for 8/12 Pitch, 14 ft Run
A roof has an 8/12 pitch, and the building is 28 feet wide. Since the ridge is centered, each rafter spans half the width, giving a run of 14 feet.
Step 1 — Find the total rise. At 8/12 pitch, the roof rises 8 inches per foot of run:
Step 2 — Apply the Pythagorean theorem:
Verify with the rafter factor: ft. The results match.
Answer: The rafter length is approximately 16.83 feet (about 16 ft 10 in).
Example 3: Stair Layout for 9 ft Total Rise
A staircase must cover a total rise of 9 feet (108 inches). The carpenter wants risers close to 7.5 inches and treads of 10.5 inches.
Step 1 — Number of risers:
Round to 14 risers. Recalculate the exact riser height:
This is within the code range of 7 to 7.75 inches, but 7.714 is very close to the 7.75-inch maximum — leaving almost no margin. Most carpenters would choose 15 risers for a more comfortable step:
This is within code. Use 15 risers at 7.2 inches each.
Step 2 — Number of treads:
Step 3 — Total run:
Step 4 — Stringer length:
Answer: The staircase has 15 risers at 7.2 in, 14 treads at 10.5 in, and requires a stringer approximately 15.2 feet long.
Example 4: Checking a Deck Frame with Diagonal Measurement
A carpenter builds a rectangular deck frame that should be 12 ft by 16 ft. To verify it is square, the carpenter measures both diagonals.
Expected diagonal:
The carpenter measures:
- Diagonal A: 20 ft 0 in
- Diagonal B: 20 ft 0.75 in
The diagonals do not match, so the frame is slightly racked. The carpenter pushes the frame toward the corner on the longer diagonal and rechecks until both diagonals read 20 ft 0 in.
Answer: The expected diagonal is 20 feet. The frame was out of square by 0.75 inches and needed adjustment.
Example 5: Length of a Diagonal Brace
A carpenter needs to cut a diagonal brace for a wall section that is 8 feet tall and 6 feet wide. The brace runs from the bottom corner on one side to the top corner on the other.
Answer: The diagonal brace is 10 feet long. (This is the 3-4-5 triple scaled by 2.)
Practice Problems
Test your understanding with these problems. Click to reveal each answer.
Problem 1: A carpenter uses the 3-4-5 method to check a corner. After measuring 3 ft along one wall and 4 ft along the other, the diagonal reads 4 ft 11 in. Is the corner square? What should the carpenter do?
The diagonal should be exactly 5 ft (60 in), but it reads 4 ft 11 in (59 in) — it is 1 inch short.
Because the diagonal is shorter than 5 feet, the angle is less than 90 degrees. The walls are too close together. The carpenter should push the walls apart until the diagonal measures exactly 60 inches.
Answer: No, the corner is not square. The walls need to be pushed apart.
Problem 2: Calculate the rafter length for a roof with a 4/12 pitch and a total run of 16 feet.
Step 1 — Total rise:
Step 2 — Rafter length:
Verify with rafter factor: ft.
Answer: The rafter is approximately 16.86 feet (about 16 ft 10 in).
Problem 3: A staircase must cover a total rise of 8 ft 4 in (100 inches). Using a riser height of approximately 7.5 inches and a tread depth of 10 inches, find the number of risers, actual riser height, total run, and stringer length.
Number of risers: — round to 13 risers
Actual riser height: in (within code range of 7 to 7.75 in)
Number of treads:
Total run: in ft
Stringer length: in ft
Answer: 13 risers at 7.69 in, 12 treads at 10 in, stringer approximately 13 feet long.
Problem 4: A door frame should be 36 inches wide and 80 inches tall. What should the diagonal measure if the frame is perfectly square?
Answer: The diagonal should measure approximately 87.73 inches (about 7 ft 3.7 in). If both diagonals of the door frame match this measurement, the frame is square.
Problem 5: A carpenter needs a diagonal brace for a rectangular opening that is 4 feet wide and 3 feet tall. How long should the brace be?
Answer: The brace is 5 feet long. (This is the 3-4-5 triple at its base scale.)
Key Takeaways
- The 3-4-5 rule (and its scaled versions 6-8-10, 9-12-15, 12-16-20) lets you check any corner for squareness with just a tape measure
- Roof pitch is expressed as rise/run — use the Pythagorean theorem to find rafter length:
- Rafter factors (unit rafter lengths) are time-saving multipliers: just multiply by the run in feet
- Stair layout requires dividing total rise by riser height, then using the Pythagorean theorem for stringer length
- Diagonal checks on rectangular frames confirm squareness — equal diagonals mean the frame is a true rectangle
- Always use the largest triangle that fits your workspace for the most accurate squareness check
Return to Geometry for more topics in this section.
Next Up in Geometry
All Geometry topicsLast updated: March 28, 2026