Roof Pitch Calculator Widget

Add a roof pitch converter to a roofing, carpentry or building-supply site. Visitors type a pitch in any form - 6/12, 26.6 degrees, 50% or a 1.118 pitch factor - and see every other form at once, plus the rafter length and ridge height for their run.

Construction & DIY Converter Runs in your browser Free · no ads

Customize your widget

Theme
Auto follows the visitor's light/dark setting.
Style
Attribution on your page
Optional and entirely your choice. The exact line is shown in the code below; it links to the tool with rel="nofollow".
More options
Starting values
Leave blank to use the widget's defaults. Visitors can still change every value.

Live preview

Exactly what your visitors will see

Embed code

<iframe src="https://a2z.tools/embed/w/roof-pitch-calculator" title="Roof Pitch Calculator by A2Z Tools" width="100%" height="780" style="border:0;width:100%" loading="lazy" allow="clipboard-write"></iframe>

A plain iframe. Works everywhere, including site builders that strip scripts. Adjust height if your content needs more room.

Works with

How it works

All four forms of a roof pitch describe one number: the slope, rise divided by run. The widget turns whatever is entered into that slope - X/12 divided by 12, the tangent of the angle, the percent divided by 100, or the square root of factor² - 1 - and then back out into every form. A 6/12 roof is 26.57 degrees, a 50% grade and a pitch factor of 1.1180, the multiplier that turns a horizontal run into length along the slope. With a run entered (half the building span, wall plate to ridge centre) it gives the rafter length and the ridge height above the plate; an overhang measured horizontally is added to the run before multiplying. The Swap button reverses the from and to units. Angles must be below 90 degrees and factors at least 1, and slopes steeper than 100 to 1 are refused.

Method

  • Slope s = rise / run = X / 12 = tan(angle) = percent / 100 = sqrt(factor^2 - 1)
  • X/12 = 12 x s; angle = atan(s) in degrees; percent grade = 100 x s
  • Pitch factor = sqrt(1 + s^2) = 1 / cos(angle)
  • Rafter length = (run + horizontal overhang) x pitch factor; ridge rise = run x s

Worked examples

Common residential pitch

Inputs: 6 in 12, convert to degrees

Result: 26.57 degrees; 50% grade; pitch factor 1.118

atan(6 / 12) = 26.565 degrees; sqrt(1 + 0.25) = 1.1180.

Rafter for an 8/12 garage roof

Inputs: 8/12; run 12 ft; overhang 1 ft

Result: Rafter 15.624 ft; ridge rise 8 ft

Factor sqrt(1 + (8/12)^2) = 1.20185; (12 + 1) x 1.20185 = 15.624 ft; 12 x 8/12 = 8 ft.

Limitations

  • Gives the theoretical line length of a common rafter; the ridge-board deduction, seat (birdsmouth) cut and plumb cuts are not applied.
  • Hip and valley rafters run diagonally and need a different factor (unit run of 16.97 in per 12 in of common run).
  • Assumes a single uniform slope; curved, gambrel and mansard roofs have more than one pitch.

Where publishers use it

  • Roofing contractors explaining what a 4/12 or 8/12 roof means to homeowners
  • Carpentry and framing tutorials on cutting common rafters
  • Solar installers converting a roof's X/12 pitch to the panel tilt in degrees
  • Shed, carport and garden-building plans sold online
  • Architecture students checking slope conversions on drawings

Questions

What does a 6/12 roof pitch mean?

The roof rises 6 inches for every 12 inches of horizontal run. That is a slope of 0.5, an angle of 26.57 degrees, a 50% grade and a pitch factor of 1.1180.

How do I convert roof pitch to degrees?

Divide the rise by 12 and take the arctangent: 4/12 gives atan(0.3333) = 18.43 degrees, 8/12 gives 33.69 degrees and 12/12 gives exactly 45 degrees.

What is a pitch factor used for?

It converts plan measurements into lengths along the slope. Multiply a horizontal run by it for the rafter length, or a footprint area by it for the roof area - 1.1180 for 6/12 and 1.4142 for 12/12.

How long is a rafter for a 24 ft wide building at 8/12?

The run is half the span, 12 ft. The 8/12 pitch factor is 1.2019, so the rafter is 14.42 ft to the ridge line, or 15.62 ft with a 1 ft horizontal overhang - before the ridge-board deduction and tail cut.

Is percent grade the same as degrees?

No. 100% grade means rise equals run, which is 45 degrees, not 100 degrees. 50% is 26.57 degrees and 25% is 14.04 degrees.

What pitch is a low-slope or a steep roof?

Roofers commonly call anything under about 3/12 or 4/12 low-slope, where membranes or special shingle underlayment are used, and pitches above about 9/12 steep, where crews need roof jacks and harnesses. A 45-degree, 12/12 roof is often called a square pitch.

How do I measure the pitch of an existing roof?

Hold a level horizontally against the rafter or roof surface, mark 12 inches along it and measure straight up to the roof - that number is the rise in 12. A smartphone inclinometer reading in degrees works too; enter it with 'Angle' as the from unit.

Cite or recommend this tool

If you reference this tool in an article, course or documentation, these formats are ready to copy. They are optional - nothing is added to your site unless you paste it.

A2Z Tools Roof Pitch Calculator
https://a2z.tools/embed/roof-pitch-calculator
  • Roofing Calculator

    Construction & DIY Calculator New

    Roof area, squares, shingle bundles and underlayment rolls from the footprint, overhang and pitch.

    Get code
  • Stair Calculator

    Construction & DIY Calculator New

    Risers, treads, total run, stringer length and angle for a straight stair, checked against IRC or UK limits.

    Get code
  • Solar Tilt Angle Calculator

    Solar & Energy Calculator New

    Best fixed tilt and facing direction for solar panels at any latitude, with seasonal angles.

    Get code
  • Unit Converter

    Education & Math Converter

    Length, mass, volume, area, temperature, speed, time, data, pressure, energy and power - exact factors.

    Get code
  • Concrete Calculator

    Construction & DIY Calculator New

    Concrete volume for slabs, footings, round columns or steps, with pre-mix bags and site-mix cement.

    Get code
  • Brick Calculator

    Construction & DIY Calculator New

    Bricks or blocks for a wall from its size and openings, with US, UK, Indian and CMU unit presets.

    Get code

Preview