Updated on April 18th, 2026

Rafter Calculator

Created By Jehan Wadia

Calculation Mode

Enter Pitch and Run to calculate Rise and all rafter dimensions.

Rafter Run from Building Width (optional)
Rafter Inputs
ft in
ft in
°
in 12
in
in
e.g. 2×8 = 7¼"
in
e.g. 2× lumber = 1½"
in
in
ft in
Rafter Calculation Results
Rafter Length (ridge to wall)
13 ft 5 in
Total Rafter Length (with overhang)
14 ft 6 3/16 in
Rise
6 ft 0 in
Run
12 ft 0 in
Pitch
6 in 12 (26.57°)
Overhang (Vertical Rise)
6 in
Overhang Rafter Length (slope)
1 ft 1 3/16 in
Ridge Plumb Cut Angle
26.57°
Tail Plumb Cut Angle
26.57°
Birdsmouth Seat Cut
3 1/2 in
Birdsmouth Plumb Cut
1 3/4 in
HAP (Height Above Plate)
5 3/4 in
Ridge Height (from floor)
14 ft 0 in
Slope Factor
1.1180
Rafter Diagram
Pitch / Angle Reference
Pitch (in 12) Angle (°) Slope Factor Rise per Foot

Introduction

A rafter is one of the sloped beams that holds up your roof. It runs from the top ridge of the roof down to the outer wall of your building. When you build or repair a roof, you need to know the exact length of each rafter so you can cut your lumber correctly. This rafter calculator helps you figure out that length quickly and easily. Just enter your roof's span, pitch, or rise and run, and the tool does the math for you. It works for common rafters, hip rafters, and jack rafters. Whether you are a homeowner planning a DIY project or a contractor on a job site, this calculator saves you time and helps you avoid costly cutting mistakes.

How to use our Rafter Calculator

Enter your roof measurements below to find the rafter length, ridge board height, and birdsmouth cut dimensions you need for your project.

Run (Horizontal Distance): Enter the horizontal distance from the outside edge of the wall to the center of the ridge board. This is usually half the total span of the building. Enter this value in feet or inches. If you need help determining the horizontal distance across your building footprint, our square footage calculator can assist with basic area and dimension calculations.

Roof Pitch: Enter the slope of your roof. This is written as a ratio, such as 6/12, which means the roof rises 6 inches for every 12 inches of horizontal run. You can enter this as a fraction or pick from common pitch options. If you need to determine the slope from two known points, a slope calculator can help you understand the relationship between rise and run.

Wall Height: Enter the height of your exterior wall from the top of the foundation to the top plate where the rafter will sit. Enter this value in feet or inches.

Rafter Width: Enter the width of the lumber you plan to use for your rafters. Common sizes include 2x6, 2x8, 2x10, or 2x12. This helps calculate the birdsmouth cut and tail length. When framing your walls to support these rafters, use our stud calculator to determine the correct number and spacing of wall studs.

Eave Overhang: Enter how far you want the rafter tail to extend past the outside edge of the wall. This overhang protects your walls from rain and gives your roof its finished look. Enter this value in inches.

Ridge Board Thickness: Enter the thickness of your ridge board. This is usually 1.5 inches for dimensional lumber. The calculator uses this to adjust the rafter length so everything fits tight at the peak.

What Is a Rafter?

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 hold up the roof sheathing and shingles, and they carry the weight of the roof down to the walls of the building. Every stick-framed roof relies on rafters cut to the right length and angle so the roof fits together properly.

Key Rafter Measurements You Need to Know

Run is the horizontal distance from the outer edge of the wall to the center of the ridge. For a simple gable roof, the run is usually half the building width minus half the ridge beam thickness. Rise is the vertical distance from the top of the wall to the top of the ridge. Pitch describes how steep the roof is, expressed as inches of rise per 12 inches of run. For example, a 6-in-12 pitch means the roof goes up 6 inches for every 12 inches it goes sideways. These three values are all connected — if you know any two, you can figure out the third. The underlying math is the same principle used in a distance calculator, where two known sides of a right triangle reveal the third.

How Rafter Length Is Calculated

Rafter length is found using the Pythagorean theorem. The run and rise form the two short sides of a right triangle, and the rafter is the long side (the hypotenuse). The formula is:

Rafter Length = √(Run² + Rise²)

A related number called the slope factor makes this easier. The slope factor equals 1 divided by the cosine of the roof angle. Multiply the run by the slope factor, and you get the rafter length along the slope. This same factor applies to the overhang portion of the rafter.

Birdsmouth Cut

The 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 a horizontal cut that rests flat on the wall, and the plumb cut, which is a vertical cut that fits snug against the outside of the wall. The birdsmouth keeps the rafter from sliding off the wall and gives it a solid bearing surface. Building codes typically require that no more than one-third of the rafter depth be removed by the birdsmouth.

HAP (Height Above Plate)

HAP stands for Height Above Plate. It is the amount of rafter material that sticks up above the wall plate after the birdsmouth is cut. HAP matters because it determines how much material is left to carry the roof load at the wall. A larger birdsmouth cut means a smaller HAP, which can weaken the rafter at that point.

Overhang and Tail Cut

The overhang is the part of the rafter that extends past the exterior wall. It protects the walls from rain and gives the roof its eave. The overhang is measured horizontally, and its slope length is calculated using the same slope factor as the main rafter. The tail cut at the end of the overhang is a plumb cut made at the same angle as the ridge cut.

Ridge Height

The ridge height is the total distance from the finished floor to the top of the ridge board. It equals the wall height plus the rise. Knowing the ridge height helps you set the ridge board at the correct position before installing rafters.

Common Roof Pitches

Roof pitches typically range from 2-in-12 for low-slope roofs up to 12-in-12 for steep roofs. A 4-in-12 pitch is common on ranch-style homes, while 8-in-12 or steeper is common on traditional and colonial designs. Steeper pitches shed rain and snow faster but require more material and are harder to work on safely. Once you have your rafters set and the roof decked, you can estimate roofing material quantities — for example, our asphalt calculator helps with paving projects, while the insulation calculator is useful when figuring out how much insulation to place between your rafters. For the interior finish below, a drywall calculator can help you estimate ceiling and wall materials, and a paint calculator lets you plan your final coating. If your project also involves a concrete foundation or footings, check out our concrete calculator to estimate the right volume of material.


Frequently Asked Questions

What is a birdsmouth cut on a rafter?

A birdsmouth is a notch cut into the bottom of a rafter where it sits on top of the wall plate. It has two parts: a seat cut (horizontal) that rests flat on the wall, and a plumb cut (vertical) that fits tight against the outside edge of the wall. This notch keeps the rafter locked in place so it does not slide off.

What does HAP mean in rafter framing?

HAP stands for Height Above Plate. It is the amount of rafter material left above the wall plate after you make the birdsmouth cut. A bigger birdsmouth means a smaller HAP, which can weaken the rafter at the wall. Most codes require that at least two-thirds of the rafter depth remain intact.

How do I find the rafter run from my building width?

Divide the total building width by 2, then subtract half the ridge beam thickness. This gives you the horizontal run for one side of the roof. The calculator has an optional section at the top where you can enter your building width and ridge beam thickness to calculate this automatically.

What is the slope factor and how is it used?

The slope factor is a number you multiply by the horizontal run to get the rafter length along the slope. It equals 1 divided by the cosine of the roof angle. For example, a 6-in-12 pitch has a slope factor of about 1.1180. If your run is 12 feet, the rafter length along the slope is 12 × 1.1180 = about 13.42 feet.

What calculation modes does this rafter calculator offer?

The calculator has three modes:

Pick the mode that matches the measurements you already have.

How do I read roof pitch like 6 in 12?

A pitch of 6 in 12 means the roof rises 6 inches for every 12 inches of horizontal distance. The first number is the rise, and 12 is always the run. A higher first number means a steeper roof. For example, 4 in 12 is a gentle slope and 12 in 12 is a 45-degree roof.

What lumber size should I enter for rafter depth?

Enter the actual depth of your lumber, not the nominal size. A 2×8 board has an actual depth of 7¼ inches. A 2×6 is 5½ inches, a 2×10 is 9¼ inches, and a 2×12 is 11¼ inches. The calculator uses this to figure out the birdsmouth cut and HAP.

Why is the rafter thickness important?

Rafter thickness is the actual width of the lumber face (1½ inches for standard 2× lumber). The calculator uses this measurement along with the birdsmouth dimensions to give accurate cut details. It also matters when figuring ridge beam connections.

What is a typical overhang length for a roof?

Most homes use an overhang between 12 and 24 inches. A 12-inch overhang is common and gives decent wall protection. Larger overhangs of 18 to 24 inches offer better rain and sun protection but need stronger rafter tails. Enter your desired overhang as a horizontal measurement in the calculator.

Does this calculator work for hip rafters or valley rafters?

This calculator is designed for common rafters that run straight from the ridge to the wall. Hip and valley rafters travel at a 45-degree angle across the building and need a different formula. You can still use the pitch, rise, and run results from this tool as a starting point for hip rafter math.

What is the ridge plumb cut angle?

The ridge plumb cut is the angled cut at the top of the rafter where it meets the ridge board. For a common rafter, this angle equals the roof pitch angle. You set your speed square or miter saw to this angle to make the cut. The calculator shows this angle in degrees.

How do I use the Transfer Run button?

First, open the Rafter Run from Building Width section. Enter your building width and ridge beam thickness, then click Calculate Run. The tool shows the calculated run. Click Use this Run to automatically fill that number into the main Rafter Run input field so you can calculate the full rafter right away.

Should the birdsmouth seat cut or plumb cut match my wall thickness?

Ideally, the seat cut of the birdsmouth should be close to the wall plate width so the rafter bears fully on the wall. For a standard 2×4 wall, that means a seat cut of about 3½ inches. Never cut the birdsmouth deeper than one-third of the rafter depth, or you risk weakening the rafter.

What is the difference between rafter length and total rafter length?

Rafter length is the distance along the slope from the ridge to the outside edge of the wall. Total rafter length adds the overhang portion. The total length is what you need to know when buying and cutting your lumber.

Can I use this calculator for a shed roof or lean-to?

Yes. A shed roof has rafters that slope in one direction. Enter the full horizontal run from the high wall to the low wall, set your pitch, and the calculator will give you the correct rafter length. Just remember the run is not halved like it is on a gable roof.

How accurate are the fraction measurements in this calculator?

The calculator rounds results to the nearest 1/16 of an inch, which is the standard precision used in wood framing. This level of accuracy is more than enough for cutting rafters on a job site.


Related Calculators

Shingle Calculator

Visit Shingle Calculator