RF—06 / Triangle solver

Rise Run Calculator

Choose exactly two known properties. The solver calculates the other two and reports the equivalent roof pitch with impossible and indeterminate pairs rejected.

RF / TRIANGLE—06rgw-core 0.2.0

Live calculator

Solve a right triangle

Selected method: rise + run. All length results use ft.

Calculated result17.000 ft
Slope length
Primary
Rise
8.000 ft
Run
15.000 ft
Angle
28.072°
Equivalent pitch
6.400 / 12
selected pair determines the rearranged Pythagorean or trigonometric relationship
display rounded; calculation retains precision
Right-triangle roof geometry showing vertical rise, horizontal run, slope length and angle.HORIZONTAL RUNVERTICAL RISESLOPE LENGTHANGLE
Right-triangle roof geometry showing vertical rise, horizontal run, slope length and angle.

Six supported pairs

The supported pairs are rise and run; rise and slope length; run and slope length; run and angle; rise and angle; and slope length and angle. Each pair uses standard right-triangle relationships.

Slope length must exceed rise and cannot be less than run. Angle pairs require an angle greater than zero and less than 90 degrees, with sufficient positive length information.

Examples

Rise 8 and run 15 forms an 8–15–17 triangle. The angle is approximately 28.07 degrees and the pitch is 6.4/12.

A 4 m run at 45 degrees has rise 4 m and slope length approximately 5.657 m. Results keep the chosen unit because all sides use one consistent scale.

Use as geometry only

These calculations describe geometry only. They do not size rafters or trusses, assess loads, approve a design, interpret building codes, specify cuts or fasteners, or guarantee material quantities.

Keep a record of the original measurements, unit system, selected mode and any adjustment. Recalculate independently before ordering material or making a construction decision.

Roof work can cause serious injury. Do not climb onto a roof merely to collect inputs. Prefer drawings, ground-level measurements, accessible interior information or dimensions supplied by a competent professional.

Inputs, units and calculation stages

Choose exactly two known properties from rise, run, slope length and angle. Every dimensional value uses the selected length unit. Angle is measured above horizontal and must be greater than zero and less than 90 degrees for angle-based pairs.

The selected pair determines the rearranged formula. Rise plus run uses the Pythagorean theorem and arctangent. A leg plus hypotenuse uses square-root subtraction. A leg plus angle uses tangent, sine or cosine. The result identifies the selected method.

Worked examples

Example A

Rise 8 and run 15 form an 8–15–17 triangle: slope length 17, angle 28.072487° and pitch 6.4/12. The unit may be inches, feet, metres or millimetres when both legs match.

Example B

Run 4 m and angle 45° give rise 4 m and slope length 5.656854 m. Rise 3 ft and slope 5 ft give a 4 ft run. Run 12 ft and slope 13 ft give 5 ft rise, demonstrating both hypotenuse pairs.

Errors, limits and responsible use

Slope length must exceed either known leg. Near-zero angles create very small rise or very large run depending on the pair; near-90-degree angles can create extreme values. Zero, 90 degrees and non-finite results are rejected rather than treated as meaningful roof geometry.

Check the source measurements, selected unit, representation and displayed assumptions before consequential use. RoofFigured explains geometry only; it does not provide structural design, code approval, installation instructions or a guaranteed material order.

Frequently asked questions

Why must the slope exceed a known leg?
The hypotenuse is the longest side of a non-degenerate right triangle.
What tolerance is used?
Full JavaScript double precision is retained; the display is rounded and input uncertainty remains separate.
Can I mix feet and inches?
Use the selector and convert both known lengths to one common unit first.
Why does rise plus angle become unstable near zero?
Dividing a fixed rise by a tiny tangent creates an extremely long run.
Is the diagonal a cutting length?
No. It is only the ideal right-triangle slope line.

Continue the calculation

Pitch concepts provides the next explanation; Common-rafter limits

Choose exactly two independent properties

A right triangle is determined by a suitable pair among rise, horizontal run, slope length and angle. Supported pairs are rise–run, rise–slope, run–slope, run–angle, rise–angle and slope–angle. The two values must be independent and physically possible. Slope length must exceed either leg, and an entered acute angle must be greater than zero and less than ninety degrees.

Use one consistent linear unit for every side. An angle is unitless, but a rise in millimetres and run in metres must be normalised before comparison. Label the triangle’s endpoints and identify which side is horizontal. An arbitrary diagonal from a drawing is not necessarily the roof slope line, and a full building span is not automatically one roof run.

Reconcile the solved triangle

For rise 8 and run 15, the Pythagorean theorem gives slope length 17, while atan(8/15) gives an angle of about 28.07 degrees. The pitch ratio is 8/15 and rise per 12 is 6.4. Square the two solved legs and compare their sum with the square of the solved slope; the relationship should agree before display rounding.

For a run–angle pair, rise is run × tan(angle) and slope is run ÷ cos(angle). For a rise–slope pair, run is √(slope² − rise²). RoofFigured rejects dependent, incomplete and impossible pairs rather than filling a field with NaN or Infinity. If the answer surprises you, verify the selected pair, units and angle reference before changing an input to force an expected result.

Keep the triangle attached to its real boundary

A solved triangle is meaningful only when its sides correspond to the intended roof plane. Record whether the horizontal side runs from wall to ridge, wall to eaves or another defined pair of points. Ridge, overhang and physical member details may require separately documented adjustments. Do not reuse a triangle from one plane for an addition with a different pitch or boundary.

The solver provides mathematical geometry, not structural sizing, fabrication, drainage or building-code approval. Confirm consequential dimensions against the governing design and a competent professional. Do not climb onto a roof to obtain missing values. Where two reliable independent properties cannot be established safely, the correct result is that the calculation is not yet supported.

Reviewed 4 September 2026Calculation version rgw-core 0.2.0