Slope Calculator: Height, Length and Angle
Calculate the height, length and slope of a right triangle directly in the browser. Enter two of the three values – the third is filled in automatically, in percent or degrees. Useful for ramps, roof pitches, drainage lines, embankments and other slope questions in everyday planning work.
Enter two of the three values – the third is calculated automatically.
Sketch not to scale, the calculated values are exact.
How the slope is calculated
Slope describes the ratio of height to length of a right triangle. As a percentage, slope = height ÷ length × 100; in degrees, slope = arctan(height ÷ length). The calculator solves this relationship for whichever value is missing, regardless of which two quantities are known.
What matters here is the meaning of “length”: the horizontal run, not the sloping line from bottom to top. The sketch is laid out the same way – the base line is horizontal, the height stands perpendicular to it. Using the sloping distance instead gives a slope that is too small.
Because the calculator solves the formula in both directions, it also works backwards: a given slope and a known length yield the required difference in height, while slope and height give the length needed. That is the more common case in everyday planning – the slope is usually fixed, and what you need is its effect on the geometry.
Percent, degrees and ratio
The same gradient is written in three ways. Percent is the most common – on drawings, in tender documents, and for ramps and pipework alike. Degrees are used mainly for roof pitches, and the ratio 1:n appears alongside them. Percent and ratio convert directly into one another (2% equals 1:50), degrees do not scale linearly – which is why the angle does not double when going from 10% to 20%.
| Percent | Degrees | Ratio |
|---|---|---|
| 1% | 0.57° | 1:100 |
| 1.5% | 0.86° | about 1:67 |
| 2% | 1.15° | 1:50 |
| 3% | 1.72° | about 1:33 |
| 5% | 2.86° | 1:20 |
| 10% | 5.71° | 1:10 |
| 25% | 14.04° | 1:4 |
| 50% | 26.57° | 1:2 |
| 100% | 45.00° | 1:1 |
100% is not vertical but 45 degrees – height and length are equal at that point. A vertical run would mean an infinite slope, which is why the calculator only accepts angles below 90 degrees.
Using the calculator
- Fill in two of the three fields – the third is calculated immediately and marked “calculated”.
- Height and length can be entered independently in millimetres, centimetres or metres. The units do not have to match: 2 cm of height over 5 m of length is a valid entry.
- The slope is shown either in percent or in degrees. Switching between them keeps the gradient the same and only changes the notation.
- A field that has already been calculated can simply be overwritten – one of the other two quantities is then recalculated instead.
- The sketch illustrates the triangle as you type. It is deliberately not to scale; the numbers are.
- “Reset” clears every field and restores the initial units.
Typical applications
The calculator is not a substitute for a standard or for professional design work – which gradient is permitted or required in a given case is set out in the relevant code, the product data sheet or the project specification. It takes over the arithmetic once the target value is known:
- Check the slope of drainage lines and floor drains.
- Work out a roof pitch from ridge height and rafter length.
- Design ramps, driveways and embankments within an allowed slope.
- Back-calculate a height or length from a known slope.
- Translate figures between percent and degrees when drawing and data sheet use different notations.
- Check quickly on site whether an executed gradient matches the target value.
Everything stays on your device
The calculator runs entirely in the browser. The dimensions you enter are neither sent to a server nor stored; closing the tab discards them. This is the same approach as in PDF Compare and the sketch tool: there is no upload, because the processing happens where the data already is. The reasoning is set out in more detail under Methodology; terms around gradients, drainage and roof build-up are explained in the glossary (German).