To calculate the geometric length of a roof rafter, use the rise and horizontal run as the two sides of a right triangle. The basic formula is:
For example, if the roof has a 3 m horizontal run and a 2 m rise:
Rafter length = approximately 3.606 m
This gives the geometric slope length before considering overhangs, cuts, birdsmouth details, ridge connections or other framing requirements.
Rafter length is one of the most useful measurements when planning a pitched roof. It connects the roof's pitch, rise, run and slope length and can also help when estimating roofing surface dimensions.
The calculation itself is simple, but getting the correct measurements matters. A roof's full width, half-span, overhang and pitch can all affect the final measurement.
Table of Contents
- What Is a Roof Rafter?
- Rafter Length Formula
- How to Calculate Rafter Length From Rise and Run
- How to Calculate Rafter Length From Roof Pitch
- Rafter Length by Common Roof Pitch
- How to Calculate Roof Run
- How Overhang Affects Rafter Length
- Worked Rafter Length Examples
- Calculating Rafter Length for a Gable Roof
- Rafter Length on Hip and Complex Roofs
- Geometric Length vs Actual Cut Length
- Common Rafter Calculation Mistakes
- Use the Roof Pitch Calculator
- Frequently Asked Questions
What Is a Roof Rafter?
A roof rafter is an inclined structural member that runs from a lower roof edge toward the ridge or another upper support. On a simple pitched roof, the rafter follows the slope of the roof.
For basic geometry, a rafter can be represented as the hypotenuse of a right triangle. The horizontal leg represents the run, the vertical leg represents the rise, and the sloping side represents the geometric rafter length.
| Measurement | What It Represents |
|---|---|
| Rise | Vertical height gained from the lower point to the upper point. |
| Run | Horizontal distance from the lower point to the upper point. |
| Rafter length | Sloping distance between the two points. |
| Pitch | The rise-to-run relationship, commonly written as a ratio such as 6:12. |
| Roof angle | The angle between the rafter and the horizontal. |
Rafter Length Formula
The basic rafter calculation uses the Pythagorean theorem. Because the rise and run form two sides of a right triangle, the sloping rafter forms the hypotenuse.
In mathematical notation, this is commonly written as:
Where L is the rafter length, R is the horizontal run and H is the vertical rise.
The same unit must be used for both rise and run. If the rise is in metres, the run should also be in metres. If the measurements are in feet, keep both in feet.
How to Calculate Rafter Length From Rise and Run
When both rise and run are known, the calculation has three basic steps.
- Square the horizontal run.
- Square the vertical rise.
- Add the two results and take the square root.
Example: 3 m run and 2 m rise
Suppose one side of a roof has a horizontal run of 3 metres and rises 2 metres to the ridge.
Rise squared = 2 x 2 = 4
9 + 4 = 13
Rafter length = square root of 13
Rafter length = approximately 3.606 m
The geometric rafter length is therefore approximately 3.61 metres.
How to Calculate Rafter Length From Roof Pitch
Sometimes the roof pitch is known instead of the rise and run. A common roof pitch is written as 6:12, meaning the roof rises 6 units for every 12 units of horizontal run.
The first step is to convert the pitch into a decimal slope.
For a 6:12 roof:
The rafter length can then be found from the run and slope.
For a 6:12 roof with a 12 ft run:
Rise = 6 ft
Now calculate the rafter:
Rafter length = square root of 180
Rafter length = approximately 13.42 ft
So the geometric rafter length is approximately 13.42 feet.
Rafter Length by Common Roof Pitch
For a given horizontal run, a steeper roof produces a longer sloping rafter. The table below uses a 12-unit horizontal run to show the relationship.
| Roof Pitch | Rise | Approx. Rafter Length | Roof Angle |
|---|---|---|---|
| 2:12 | 2 | 12.17 | 9.46 degrees |
| 3:12 | 3 | 12.37 | 14.04 degrees |
| 4:12 | 4 | 12.65 | 18.43 degrees |
| 5:12 | 5 | 13.00 | 22.62 degrees |
| 6:12 | 6 | 13.42 | 26.57 degrees |
| 7:12 | 7 | 13.89 | 30.26 degrees |
| 8:12 | 8 | 14.42 | 33.69 degrees |
| 9:12 | 9 | 15.00 | 36.87 degrees |
| 10:12 | 10 | 15.62 | 39.81 degrees |
| 12:12 | 12 | 16.97 | 45 degrees |
These values are geometric examples based on a 12-unit run. Changing the run changes the rafter length proportionally.
How to Calculate Roof Run
Getting the run correct is one of the most important parts of a rafter calculation. On a simple symmetrical gable roof, the horizontal run is usually related to half the building width rather than the full building width.
For example, if a building is 8 metres wide and the ridge is centered, the basic horizontal run from the outside wall line to the ridge centerline is:
Run = 4 m
If the roof has a 6:12 pitch, the rise is:
Rise = 2 m
The geometric rafter length is then:
Rafter length = approximately 4.472 m
However, this does not automatically account for a roof overhang. If the rafter extends beyond the wall line, the geometry needs to include that additional horizontal projection.
How Overhang Affects Rafter Length
A roof overhang extends the roof beyond the wall or supporting line. Because the rafter follows the roof slope, adding an overhang can increase the actual rafter length.
For a simple roof, the horizontal projection of the overhang can be added to the basic run before calculating the slope length.
Example with a 600 mm overhang
Suppose the basic run is 4 metres and the horizontal overhang is 0.6 metres.
Extended run = 4.6 m
For a 6:12 pitch, the slope is 0.5. The corresponding rise over the extended run would be:
Rise = 2.3 m
The resulting geometric slope length would be:
Rafter length = approximately 5.143 m
Worked Rafter Length Examples
Example 1: 4 m run and 2 m rise
For a simple pitched roof:
Rafter length = square root of 20
Rafter length = approximately 4.472 m
The geometric rafter length is approximately 4.47 metres.
Example 2: 10 ft run and 5 ft rise
Rafter length = square root of 125
Rafter length = approximately 11.18 ft
The geometric rafter length is approximately 11.18 feet.
Example 3: 5 m run with a 30% slope
First convert the slope percentage to a decimal:
Then calculate the rise:
Rise = 1.5 m
Now calculate the rafter:
Rafter length = approximately 5.220 m
The geometric rafter length is approximately 5.22 metres.
Calculating Rafter Length for a Gable Roof
A simple symmetrical gable roof has two sloping sides that meet at a ridge. For a basic calculation, each side can be treated as a right triangle.
If the building width is known, divide the width by two to obtain the basic run when the ridge is centered.
Then use the roof pitch to determine the rise and apply the rafter formula.
Example: 10 m wide building with a 4:12 roof
Assume the ridge is centered and the basic building width is 10 metres.
Run = 5 m
A 4:12 pitch has a slope of 4 / 12, or approximately 0.3333.
Rise = approximately 1.667 m
Now calculate the rafter length:
Rafter length = approximately 5.270 m
Each basic roof side therefore has a geometric slope length of approximately 5.27 metres, before any overhang or framing details are considered.
Rafter Length on Hip and Complex Roofs
Hip roofs and more complex roof shapes require additional geometry. Not every rafter will have the same run or slope length.
A simple common rafter calculation may not be sufficient for:
- Hip rafters
- Valley rafters
- Unequal roof slopes
- Multiple roof sections
- Intersecting roof planes
- Irregular building footprints
- Offset or non-centered ridges
For these roofs, divide the roof into appropriate geometric sections and determine the relevant run and rise for each section. Structural framing calculations should follow the project's drawings and applicable building requirements.
Geometric Length vs Actual Cut Length
This distinction is important when using a rafter calculator.
The geometric calculation tells you the distance along the slope between two defined points. A real rafter, however, may require additional calculations for its actual cut length and connection details.
Depending on the framing design, the finished member can involve:
- Birdsmouth cuts
- Ridge cuts
- Ridge board or ridge beam details
- Eave overhangs
- Fascia alignment
- Heel height
- Seat cuts
- Plumb cuts
- Other framing connections
These details mean the geometric slope length should not automatically be treated as the final timber cut dimension.
Common Rafter Calculation Mistakes
Using the full building width as the run
On a centered gable roof, the basic run is usually half the building width. Using the full width can double the horizontal distance used in the calculation.
Confusing rise with total building height
Roof rise is the vertical distance associated with the roof geometry being calculated. It should not automatically be treated as the entire height from ground level to ridge.
Using sloping length as the run
The run is horizontal. The rafter is the sloping length. Substituting one for the other changes the result.
Mixing measurement units
Do not calculate with a rise in millimetres and a run in metres without converting one of them first.
Forgetting the roof pitch
If only the building width is known, that does not provide enough information to determine the rafter length. You also need the roof pitch, rise, angle or another measurement that defines the slope.
Ignoring overhangs
If the requested dimension includes an eave overhang, the basic wall-to-ridge geometry may not represent the complete rafter length.
Treating the result as a structural design
The geometric length does not determine the required timber size, spacing, connections or structural capacity. Those are separate design considerations.
Use the BuildersMeasures Roof Pitch Calculator
If you know the roof rise and run but need to determine pitch or angle first, the Roof Pitch Calculator can help establish the roof geometry.
Use the Slope Calculator to calculate slope percentage and angle from rise and run.
For broader roofing measurements, the Roofing Calculator can be used alongside your roof dimensions and material measurements.
Related Roofing Calculators and Guides
- Roof Pitch Calculator
- Slope Calculator
- Roofing Calculator
- How to Calculate Roof Area
- How to Calculate Roof Pitch
- Roof Pitch vs Roof Slope
- How to Calculate Roofing Materials for a Roof
- How to Calculate Slope Percentage and Angle
- How to Calculate Stair Dimensions
- Construction Unit Converter
Frequently Asked Questions
How do you calculate roof rafter length?
Use the Pythagorean theorem: rafter length equals the square root of rise squared plus run squared. Both rise and run must use the same unit.
What is the formula for rafter length?
The basic geometric formula is rafter length = square root of (rise squared + run squared).
How do I calculate rafter length from a 6:12 pitch?
A 6:12 pitch means the roof rises 6 units for every 12 units of horizontal run. Convert the pitch to a slope of 0.5, calculate the rise from the run, then use the Pythagorean theorem to calculate the rafter length.
How do I calculate the run of a gable roof?
For a simple centered gable roof, the basic horizontal run is usually half the building width. Additional geometry may be required if the ridge is offset or the roof includes other sections.
Does rafter length include the overhang?
Not automatically. The basic formula calculates the geometric distance between the defined rise and run points. If the requested rafter length includes an overhang, the roof geometry must account for it.
Is rafter length the same as the timber cut length?
No. Geometric rafter length is the slope distance. Actual cut length can be affected by birdsmouth cuts, ridge details, overhangs and other framing requirements.
Can I calculate rafter length in feet?
Yes. Feet can be used for both rise and run. Keep the units consistent throughout the calculation.
Can I calculate rafter length from roof angle?
Yes. If the roof angle and horizontal run are known, the rise can be calculated using tangent, after which the Pythagorean theorem can be used to determine the geometric rafter length.
Rafter Length Calculation Summary
For a simple pitched roof, start with the horizontal run and vertical rise. Use the Pythagorean theorem to find the geometric slope length:
Rafter length = square root of (rise squared + run squared)For a centered gable roof, the basic run is commonly related to half the building width. Roof pitch determines the rise, while overhangs and framing details can change the actual member length.
BuildersMeasures calculators are intended as practical estimation and planning tools. Verify important project measurements, drawings, specifications and applicable requirements before ordering materials or beginning construction work.