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

Reviewed 4 September 2026Calculation version rgw-core 0.2.0