Roof Pitch Calculator: pitch, angle and rafter length

How it's calculated. Pitch is the rise in inches per 12 inches of run. Angle = atan(pitch ÷ 12); rise = run × pitch ÷ 12; rafter = run ÷ cos(angle), with the run being half the span.
24 ft span, 6/12 → 26.57° · rise 6' 0" · rafter 13' 5" (14' 6⅜" with a 12" overhang)
01

Roof and house

Roof type
ftin
ftin
in

Span is measured across the ridge between the outer faces of the walls (top plates). Rise is from the top of the walls to the top of the rafters.

02

What you know

What you know
/12

Pitch, angle, rise and percent are one slope written four ways: pitch = 12 × tan α, percent = 100 × tan α. A 12/12 roof is 45° and 100 %.

03

Roof covering

Minimum pitch 2/12 (IRC R905.2.2). Minimum slopes from IRC 2021 Chapter 9 (R905). Check the manufacturer's instructions for your product.

Roof pitch
6/12
26.6° · 50 % · rise 6' 0"
Angle26.6°
Slope50 %
Ridge height (rise)6' 0"
Rafter, no overhang13' 5"
Rafter with overhang14' 6⅜"
Slope factor1.118
Roof area1,163 ft²
Squares (100 ft²)11.6
Above the IRC minimum for this covering (2/12)
Slope geometryh = B/2 × tan α
Overhang along the slope13⅜"
Eave below the top of wall by6"

Geometry on rafter centrelines, without rafter depth, sheathing and roofing. The finished ridge sits higher by the rafter depth and the roof build-up.

Geometry only. Rafter size and spacing depend on snow and wind loads: use the IRC span tables (R802) or an engineer's design.

Section through a gable roof

B 24' 0" · 6/12 · 26.6°
Across the house: main slopes
h 6' 0"B 24' 0"26.6°rafter 14' 6⅜"
6' 0"ridge height26.6°roof angle50 %slope14' 6⅜"rafter with overhang
How we calculate

Pitch is rise per 12 inches of run. The angle is atan(pitch ÷ 12); the percent slope is 100 × pitch ÷ 12.

For a gable or hip roof the run is half the span; for a shed roof it is the whole span. Rise = run × tan α, rafter = run ÷ cos α. The eave overhang is measured horizontally, so the rafter with overhang is (run + overhang) ÷ cos α.

Hip ends: with a hip run a the hip slopes at atan(rise ÷ a), the ridge is the house length minus 2a, and the hip rafter lies over the plan diagonal √((span/2)² + a²).

Roof area adds the planes with their overhangs: plan area ÷ cos of each plane's angle. Gable ends are counted without rake overhang. A square is 100 ft² of roof.

Roof pitch
6/1226.6° · 14' 6⅜"

A gable roof over a 24-foot-wide house at a 6/12 pitch rises 6 feet to the ridge, slopes at 26.57° and needs common rafters 13' 5" long, or 14' 6⅜" with a 12-inch overhang. Over a 40-foot house that is about 1,163 square feet of roof, 11.6 squares. The calculator works the same numbers for gable, hip and shed roofs from whichever value you know: the pitch, the angle, the ridge height or the slope in percent.

Pitch, angle, rise and percent are the same slope

Pitch is written as rise over run: a 6/12 roof rises 6 inches for every 12 inches of horizontal run. The same slope can be given as an angle (atan of 6 ÷ 12 = 26.57°), as a percent (6 ÷ 12 × 100 = 50 %) or as the ridge height over a known span. Pick what you know in the second step; when you switch, the current slope carries over so the result does not jump.

PitchAngleSlopeSlope factor
3/1214.04°25.0 %1.031
4/1218.43°33.3 %1.054
5/1222.62°41.7 %1.083
6/1226.57°50.0 %1.118
7/1230.26°58.3 %1.158
8/1233.69°66.7 %1.202
9/1236.87°75.0 %1.250
10/1239.81°83.3 %1.302
12/1245.00°100.0 %1.414

The slope factor is how much longer the roof surface is than its plan: rafter length ÷ run, or 1 ÷ cos(angle). Multiply a plan area by it to get the roof area.

How to find the pitch of an existing roof

Hold a level horizontally against a rafter or the roof surface, measure 12 inches along the level and measure straight down from that mark to the roof. That distance in inches is the pitch. From the ground you can also measure the ridge height above the top of the walls and the span: enter them in "Rise" mode. A ridge 5 feet above the walls over a 28-foot span is a 4.29/12 pitch, 19.65°.

Rafter length

The run of a gable or hip rafter is half the span; on a shed roof it is the whole span. The rafter along its centerline is run ÷ cos(angle). The eave overhang is entered as a horizontal distance, as it appears on plans, so the rafter with overhang is (run + overhang) ÷ cos(angle). A 12-inch horizontal overhang at 6/12 adds 13.42 inches along the slope and drops the eave 6 inches below the top of the wall.

These are lengths on the rafter centerlines. The finished ridge sits higher by the depth of the rafter and the roof build-up, and the rafter is cut longer at the plumb cut and the birdsmouth. Sizing the rafters themselves depends on snow and wind loads: use the span tables in IRC R802 or an engineer's design.

Hip roofs

On a hip roof the main planes behave like a gable. The hip ends slope from the end walls to the ridge; their horizontal run is half the span when all planes share one pitch, which leaves a ridge equal to the house length minus the span: 40 − 24 = 16 feet in the example. You can set a different hip run for a steeper or flatter hip. The hip rafter lies over the plan diagonal √((span/2)² + run²), so at 6/12 over a 24-foot span it is 18' 0" long and slopes at 19.47°, flatter than the common rafters. The calculator keeps the eave level all round, so the overhang along the hip ends is scaled with the hip run.

Roof area and squares

The roof area adds every plane with its overhangs: plan area ÷ cos of the plane's angle. Gable ends are counted without a rake overhang. Roofing is sold by the square, 100 square feet of roof surface. The 24 × 40-foot gable roof above is 11.6 squares; the same house with a hip roof is 12.2 squares, because the overhang runs round all four sides. Add waste for starter courses, ridge caps and cuts when you order.

Minimum pitch for the covering

Every roofing material has a lowest slope at which it sheds water. The IRC sets them in Chapter 9: asphalt shingles from 2/12, and between 2/12 and 4/12 they need two layers of underlayment (R905.1.1, R905.2.2); clay and concrete tile from 2½/12; metal roof shingles, wood shingles and lapped metal panels from 3/12; slate from 4/12; standing-seam metal from ¼/12. Choose your covering and the result card flags a pitch that is too low, including the hip ends.

Common mistakes

Pouring a slab or footings for the building? The Concrete Calculator works out the cubic yards and bags.

Questions

What angle is a 6/12 roof pitch?

26.57°. The angle is atan(6 ÷ 12); the slope is 50 % and the slope factor 1.118.

What is a 4/12 pitch in degrees?

18.43°, a 33.3 % slope. Asphalt shingles are allowed from 2/12 but need two layers of underlayment below 4/12.

How do I calculate rafter length from the pitch?

Divide the run by the cosine of the angle, or multiply it by the slope factor. A 12 ft run at 6/12 gives 12 × 1.118 = 13.42 ft, which is 13' 5". Add the horizontal overhang to the run before multiplying.

How tall is the ridge on a 24 ft wide house with a 6/12 roof?

6 feet above the top of the walls: the run is 12 feet and the roof rises 6 inches per foot of run.

What is the minimum pitch for shingles?

2/12 for asphalt shingles under IRC R905.2.2. Between 2/12 and 4/12 the IRC requires two layers of underlayment (R905.1.1).

How many squares is my roof?

Roof area in square feet ÷ 100. A 24 × 40 ft gable roof at 6/12 with 12-inch overhangs is about 1,163 ft², 11.6 squares; as a hip roof it is 12.2 squares.

Is a 12/12 roof 45 degrees?

Yes: rise equals run, so the angle is 45° and the slope 100 %.