SettingsSettings for this calculationUS
Pick the pair of values you have for a right triangle, or the three you have for any other.
A right triangle — a rafter, a stringer, a brace, a ladder against a wall — is fixed by any two of its rise, run, slope length and slope angle, and only the fields for the pair chosen are shown. Any other triangle needs three values including at least one side: three sides, two sides with the angle between them, two angles with the side between them, or two angles with a side opposite one. Two sides with an angle that is not between them is the one case that can fit two triangles, and the page then shows both.
The vertical leg: how far the slope climbs over its run.
For a common rafter it is the height the rafter's line climbs from the wall plate to the ridge's centre line; for a stair, the finished floor-to-floor height of the flight; for a brace, the height of the frame between the points it joins. Measure it plumb, not along anything that leans.
Tools needed: Tape measure, Spirit level or laser
The horizontal leg: the plan distance the slope covers.
For a common rafter it is half the span, measured level from the outside of the wall plate to the ridge's centre line, with the rise taken over that same run; half the ridge's thickness comes off the rafter afterwards, measured square to the ridge. For a stair it is the total going from the first nosing to the last; for a brace, the width of the frame between the brace's ends. A run measured along a sloping floor is not a run.
Missing side or area
12.65 ft slope length
Rise and run fix the triangle: the slope length is the square root of the two squared and added, and the slope angle is the one whose tangent is rise over run. A common rafter's run and rise give its line length this way, a flight's total rise and total going give the stringer, and a frame's height and width give the brace across it.
- Rise, side a
- 4 ft
- Run, side b
- 12 ft
- Slope length, side c
- 12.65 ft
- Slope angle at the base, angle A
- 18.43 °
- Angle at the top, angle B
- 71.57 °
- Rise over run
- 33.33 %
- Area
- 24 ft²
- Perimeter
- 28.65 ft
They open the calculator with your figures already in it
Triangle Calculator — Right Triangle and Any Triangle Solver: 12.65 ft slope length — shown in imperial, US market. The link sets both, so the result they see is the one on your screen.
Show calculation logicHide calculation logic
How this was calculated
Formula source(s)
- NIST Digital Library of Mathematical Functions, §4.42 Solution of Triangles: the right-triangle ratios sin A = a/c, cos A = b/c and tan A = a/b (4.42.1–4.42.3), the law of sines (4.42.4), the law of cosines c² = a² + b² − 2ab cos C (4.42.5), and the area ½bc sin A = √(s(s − a)(s − b)(s − c)) with s the semi-perimeter (4.42.7)
- Euclid, Elements, Book I (D. E. Joyce's edition, Clark University): Proposition 47, the square on the side opposite the right angle equals the squares on the other two sides together; Proposition 32, the three angles of a triangle together make two right angles; Proposition 20, any two sides of a triangle together are greater than the third
- OpenStax, Algebra and Trigonometry 2e (Rice University), §10.1 Non-right Triangles: Law of Sines — two sides and a non-included angle (SSA) may give no triangle, one right triangle, one triangle or two triangles; the area of an oblique triangle is half the product of two sides and the sine of the angle between them
- DeWALT Rafter Square (DWHT46031) instruction manual: rafter lengths from the tables are to the centre of the ridge, so half the ridge board's thickness is deducted from the listed length before the top plumb cut is made, measured at right angles to the top plumb cut line and marked parallel to it; the worked example takes the run as half of a 20 ft building's width
Inputs used
- What You Know
- Right triangle: the rise and the run
- Rise
- 4 ft
- Run
- 12 ft
- Run
- 12 ft
- Slope Length
- 13 ft
- Rise
- 8.5 ft
- Slope Length
- 14 ft
- Run
- 12 ft
- Slope Angle (degrees)
- 30
- Rise
- 8.5 ft
- Slope Angle (degrees)
- 35
- Slope Length
- 15.5 ft
- Slope Angle (degrees)
- 45
- Side a
- 23 ft
- Side b
- 16.5 ft
- Side c
- 19.5 ft
- Side b
- 13 ft
- Side c
- 16.5 ft
- Angle A Between Them (degrees)
- 60
- Angle B (degrees)
- 50
- Angle C (degrees)
- 60
- Side a Between Them
- 19.5 ft
- Angle A (degrees)
- 40
- Angle B (degrees)
- 60
- Side a
- 16.5 ft
- Side a
- 13 ft
- Side b
- 16.5 ft
- Angle A (degrees)
- 40
Intermediate steps
- Rise, side a
- 4 ft
- Run, side b
- 12 ft
- Slope length, side c
- 12.65 ft
- Slope angle at the base, angle A
- 18.43 °
- Angle at the top, angle B
- 71.57 °
- Rise over run
- 33.33 %
- Area
- 24 ft²
- Perimeter
- 28.65 ft
Confidence note: Rise and run fix the triangle: the slope length is the square root of the two squared and added, and the slope angle is the one whose tangent is rise over run. A common rafter's run and rise give its line length this way, a flight's total rise and total going give the stringer, and a frame's height and width give the brace across it.
What this calculation does not cover
- This is plane geometry: every side is a straight line on a flat surface. A tape laid down a slope measures the slope and not the plan distance, so a triangle meant for a plan, a plot or a slab needs horizontal measurements — stepped down the slope or taken along a level line — or the figures describe a different triangle from the one being set out.
- A right triangle takes exactly two values. Knowing a third does not make the answer better, it makes a check: solve from the two you trust most and compare the third with what the page returns, because a disagreement is a measuring error somewhere.
- Angles are typed in decimal degrees. A reading in degrees and minutes has to be converted first — thirty degrees and fifteen minutes is 30.25 — and a roof pitch given as a rise per unit of run belongs on the rise and run fields, not in an angle box.
- The lengths are line lengths between points, not cut lengths. A rafter's line runs from the ridge's centre line to the outside of the wall plate; the ridge deduction — half the ridge's thickness, measured square to the ridge — the overhang and the seat cut all come afterwards and are worked on the rafter pages, and a stringer's cutting length depends on how its ends are detailed.
- Small angular errors grow with distance. One degree off over 10 m (33 ft) moves the far end about 175 mm (7 in), so an angle that sets out a long line wants measuring as carefully as the lengths, and a long triangle is better fixed by its three sides than by an angle.
- Values that cannot make a triangle are not repaired. The page returns zero with the reason and the amount by which the figures miss, rather than guessing which of them was meant.
Computed in your browser — nothing you enter is uploaded. Presented in US customary units and US trade terminology. Where a formula follows a published standard, that standard and its edition are cited beside it on this page; where none governs, the page says so. Local amendments override model codes — verify against the code in force where you build.
Sources checked 2026-10-05 · v1.0.0
Regulatory standards & verification citations4
- NIST Digital Library of Mathematical Functions, §4.42 Solution of Triangles: the right-triangle ratios sin A = a/c, cos A = b/c and tan A = a/b (4.42.1–4.42.3), the law of sines (4.42.4), the law of cosines c² = a² + b² − 2ab cos C (4.42.5), and the area ½bc sin A = √(s(s − a)(s − b)(s − c)) with s the semi-perimeter (4.42.7)
- Euclid, Elements, Book I (D. E. Joyce's edition, Clark University): Proposition 47, the square on the side opposite the right angle equals the squares on the other two sides together; Proposition 32, the three angles of a triangle together make two right angles; Proposition 20, any two sides of a triangle together are greater than the third
- OpenStax, Algebra and Trigonometry 2e (Rice University), §10.1 Non-right Triangles: Law of Sines — two sides and a non-included angle (SSA) may give no triangle, one right triangle, one triangle or two triangles; the area of an oblique triangle is half the product of two sides and the sine of the angle between them
- DeWALT Rafter Square (DWHT46031) instruction manual: rafter lengths from the tables are to the centre of the ridge, so half the ridge board's thickness is deducted from the listed length before the top plumb cut is made, measured at right angles to the top plumb cut line and marked parallel to it; the worked example takes the run as half of a 20 ft building's width
Cite this page
Your workspace
Most jobs need more than one number. Add the calculators you need next and they open right here, underneath this one — your figures stay on screen and nothing is lost to a page change.