Introduction
Building a roof starts with getting your rafter measurements right. A rafter is the sloped board that runs from the ridge at the top of your roof down to the outer wall, and every cut you make on it depends on knowing the exact rise, run, pitch, and length. Getting even one number wrong can mean wasted lumber, a sagging roofline, or a roof that doesn't shed water the way it should.
This rafter calculator takes the guesswork out of roof framing. Enter your roof pitch, rafter run, and overhang, and it will give you the full rafter length, birdsmouth seat and plumb cut sizes, the height above plate (HAP), ridge height from the floor, and all the cut angles you need. You can also calculate your rafter run directly from the building width and ridge beam thickness, so you don't have to do that math by hand. Choose from three calculation modes — solve for rise, pitch, or run — depending on what measurements you already have. The built-in diagram updates with your inputs so you can see the rafter layout before you pick up a saw, and the pitch reference table gives you quick access to common angles and slope factors for standard roof pitches from 1-in-12 all the way up to 16-in-12.
How to Use Our Rafter Calculator
Enter your roof measurements and rafter details below, and this calculator will give you the rafter length, birdsmouth cut dimensions, ridge height, slope factor, and all the angles you need to frame your roof.
Calculation Mode — Choose what you want to solve for. Select "Calculate Rise" if you know the pitch and run, "Calculate Pitch" if you know the rise and run, or "Calculate Run" if you know the rise and pitch. The calculator will hide the field it solves for and show the other two as inputs.
Rafter Run from Building Width (Optional) — If you don't know your rafter run, expand this section and enter your total building width along with your ridge beam thickness. The calculator will split the width in half and subtract half the ridge beam to find your run.
Rafter Run — Enter the horizontal distance from the outside edge of the wall plate to the center of the ridge, in feet, inches, and fractions of an inch.
Rise — Enter the total vertical height the rafter climbs from the top of the wall plate to the top of the ridge, in feet, inches, and fractions of an inch.
Roof Pitch — Enter the pitch as a degree angle or pick a standard pitch from the dropdown menu in the "X in 12" format. Changing one will update the other automatically. If you need help determining your roof's pitch, try our dedicated roof pitch calculator.
Overhang (Horizontal) — Enter the horizontal distance the rafter tail extends past the outside of the wall. This is measured level, not along the slope.
Rafter Depth — Enter the actual depth of your rafter lumber in inches. For example, a 2×8 board has an actual depth of 7¼ inches. You can use our board foot calculator to estimate how much lumber you'll need for your project.
Rafter Thickness — Enter the actual thickness of your rafter lumber. Standard 2× dimensional lumber has an actual thickness of 1½ inches.
Birdsmouth Cut Type — Choose whether you want to define your birdsmouth by its seat cut (the horizontal cut that sits on the wall plate) or its plumb cut (the vertical cut against the wall).
Birdsmouth Dimension — Enter the size of the birdsmouth cut you selected above, in inches and fractions. The calculator will figure out the other birdsmouth measurement for you.
Wall Thickness — Enter the actual thickness of the top wall plate your rafters will sit on, in inches and fractions.
Wall Height — Enter the height of the wall from the floor to the top of the wall plate, in feet, inches, and fractions. This is used to calculate the total ridge height from the floor.
Understanding Rafters and Roof Framing
A rafter is a sloped structural board that runs from the ridge (the peak of the roof) down to the top of the exterior wall. Rafters carry the weight of the roof sheathing, shingles, snow, and wind loads, transferring all of that force down into the walls and foundation. Getting rafter measurements right is one of the most important steps in building a roof, because even small errors can cause problems with fit, water drainage, and structural strength.
Key Rafter Terms You Should Know
Run is the horizontal distance from the outside edge of the wall to the center of the ridge board. It is not the same as the full building width. For a standard gable roof, the run is half the building width minus half the thickness of the ridge board. Rise is the vertical distance from the top of the wall plate to the top of the ridge. Pitch describes how steep the roof is, usually written as a ratio like "6 in 12," which means the roof rises 6 inches for every 12 inches of horizontal run.
Rafter length is the distance measured along the slope from the ridge to the outside edge of the wall. The total rafter length adds the overhang (also called the eave or tail), which is the part that extends past the wall to protect the siding and foundation from rain.
The Birdsmouth Cut
A birdsmouth is a notch cut into the rafter where it sits on top of the wall plate. It has two parts: the seat cut, which is the horizontal part that rests flat on the wall, and the plumb cut, which is the vertical part. The birdsmouth gives the rafter a solid, flat bearing surface on the wall so it does not slide or rock. Building codes generally require that at least two-thirds of the rafter depth remains intact after the birdsmouth is cut, so the rafter stays strong.
HAP (Height Above Plate)
HAP stands for Height Above Plate. It is the amount of rafter material that sits above the top of the wall after the birdsmouth is cut. Every rafter in a roof system should have the same HAP so the top edges of all the rafters line up in a flat plane. If the HAP values are uneven, the roof sheathing will be wavy and the finished roof will look bad.
Slope Factor
The slope factor is a multiplier that converts a horizontal measurement into a measurement along the slope of the roof. For example, if you have a run of 12 feet and a slope factor of 1.118, the rafter length along the slope is 12 × 1.118 = 13.42 feet. This number comes from basic geometry — essentially a right triangle calculation — and is the same as the secant of the roof angle. It is useful for quickly figuring out how much lumber you need.
How Roof Pitch Affects Your Project
Low-pitch roofs (below 4 in 12) need special roofing materials like rolled roofing or membrane systems because water drains slowly. Standard asphalt shingles typically need a pitch of at least 4 in 12. Steeper roofs shed water and snow faster, but they use more material and are harder and more dangerous to work on. Most residential roofs in the United States fall between 4 in 12 and 9 in 12. You can use our roof area calculator to determine how much roofing material you'll need once you've established your pitch and dimensions.
Tips for Accurate Rafter Layout
- Always measure run from the outside face of the wall to the center of the ridge board, not to the far side.
- Account for the ridge board thickness. A standard 2× ridge board is actually 1½ inches thick, so each rafter's run is reduced by ¾ inch.
- Use the same birdsmouth depth on every rafter to keep your HAP consistent.
- Double-check your pitch by measuring rise and run on site before cutting all your rafters.
- Cut one rafter first and test-fit it before cutting the rest of your lumber.
- If your project involves a more complex roof structure with engineered supports, consider using a truss calculator alongside your rafter calculations.
- For projects that also involve building stairs to an upper level, our stair calculator and stair stringer calculator can help you nail those measurements too.
- When planning the full scope of your framing and wall layout, a stud calculator will help you figure out how many studs you need for your walls before you start setting rafters.