Roof Pitch & Rafter Calculator
Roof pitch as x-in-12, the angle in degrees and the rafter length, with waste included.
Pitch is rise divided by run, printed as inches per 12. The angle is the arctangent of that ratio in degrees, and the rafter is the square root of rise squared plus run squared, in metric units, times your waste percentage.
A zero or negative rise or run is refused by name, because the angle would be undefined or the slope flat. The page prints the ratio twice, as a decimal and in the x-in-12 form, so the pitch can be checked.
Every figure is an ordering estimate, not a structural specification, and none of it replaces an engineer's take-off. The arithmetic runs in your browser: nothing is uploaded and nothing is stored, so the same input prints the same answer on every reload.
Pitch is rise divided by run, printed as inches per 12; the angle is the arctangent of that ratio in degrees, and the rafter is the square root of rise squared plus run squared, times your waste percentage. A 2 m rise over a 4 m run at 5 percent therefore reads 6-in-12, 26.57 degrees and a 4.70 m rafter, in metric units.
Pitch as x-in-12, the angle in degrees, and the rafter length with waste.
An ordering estimate, not a structural specification.
How to use it
Enter rise and run in the same unit and a waste percentage, then press Run. The page prints the ratio as a decimal and in x-in-12 form, the angle in degrees and the rafter length.
Waste and units
The ratio is unitless, so rise and run only have to agree with each other; the angle follows from arctangent and is printed to two decimals. The rafter is Pythagoras on the same two figures, and the waste percentage is applied to that length rather than to the rise, which is why the two numbers move independently.
Where the page stops
A zero or negative rise or run is refused by name, because the angle would be undefined or the slope flat. The page converts the pitch into inches per 12 whatever unit you typed, so a metric rise and run still print a familiar pitch; it does not deduct a ridge board, a birdsmouth or an overhang.
What to Expect
Best for
- Turning a rise and run into a pitch and an angle.
- Getting a rafter length to order against a stated pitch.
What this tool keeps
- The ratio, the angle and the rafter all print, so any one can be checked against the other two.
What may need cleanup
- Nothing: the three figures are the whole output.
Sample input
rise 2 m, run 4 m, 5 percent waste
Sample output
Pitch: 2 ÷ 4 = 0.5 → 6-in-12 Angle: arctan(0.5) = 26.57° Rafter: √(2² + 4²) = 4.472 m, with 5 percent = 4.70 m
Frequently asked questions
How do I get the pitch and the rafter length?
Enter rise and run in the same unit and a waste percentage, then press Run. The page prints the x-in-12 pitch, the angle and the rafter length.
Is anything uploaded?
No. The arctangent and the square root are taken in this tab: nothing is posted and nothing is kept.
Why is the pitch shown in inches per 12?
Because that is how roof pitch is quoted on drawings, even where the dimensions are metric. The page converts the ratio rather than asking you to.
Is this a structural specification?
Every figure here is an ordering estimate, not a structural specification: it sizes a purchase, and an engineer's take-off or the manufacturer's data governs what is actually built.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.