Slope calculator

Compute angle (deg/rad), slope (%, ‰) and 1:n ratio from horizontal distance and start/end heights. Includes hypotenuse, Δh and quick copy.

Slope calculator

Instantly compute the slope angle, grade in percent and the 1:n ratio of a line segment using its horizontal run and the starting and ending elevations. Ideal for designing accessibility ramps, checking roof pitches or validating land surveys without opening a spreadsheet.

Instant results

Input data

Use positive values. Decimal point or comma accepted.
Convention: positive values mean the line rises from h₁ to h₂. Keep all inputs in metres to ensure consistent slope metrics.
Enter the values and press Calculate.

Results

Angle

Angle (°)
Angle (rad)

Slope

Grade %
Grade ‰
  • 1:n ratio
  • Centimetres per metre

Geometry

  • Δh
  • |Δh|
  • Hypotenuse
  • Unit vector (ux, uy)

Geometric visualization

The slope is drawn to relative scale with horizontal distance, elevation change and the true line.

Calculate to see the slope drawn to relative scale.

How this calculator works

We compute the elevation change Δh by subtracting the start height from the end height and derive the slope s = Δh / L. The arctangent of s gives the inclination angle, which we express in degrees and radians. The slope is also converted to percent, permille and a 1:n ratio, with rounding to two decimals, while the hypotenuse and the unit vector keep three decimals for accuracy.

Using the Pythagorean theorem we obtain the true length of the segment, and we normalise the direction vector so you can reuse it in CAD, BIM or physics simulations. The formulas follow standard plane trigonometry and comply with European accessibility guidance for ramps.

Interpreting the outputs

  • Positive slopes signal uphill segments; above 8% consider intermediate landings for accessibility compliance.
  • Negative slopes denote downhill runs; check surface friction and signage when the grade exceeds 10%.
  • The 1:n ratio helps you compare against building codes (e.g. 1:12 accessible ramps).
  • Centimetres per metre are useful for quick site layouts or roof drainage calculations.

Practical tips

  • Keep every measurement in metres to avoid conversion mistakes.
  • If you need a level path, set h₂ equal to h₁ and verify the ratio shows ∞.
  • Store the unit vector to reuse it as a normalised direction in design or simulation tools.

FAQ

How is the slope angle calculated?

The tool computes the slope s = Δh / L using the height difference and run. It then applies arctan(s) to obtain the inclination angle and outputs it in degrees, radians, percent and permille.

What is the difference between percent grade and the 1:n ratio?

Percent grade shows the elevation change per 100 horizontal units. The 1:n ratio tells you how many metres of run you need per metre of rise and is the common reference for accessibility ramps like 1:12.

Can I enter negative slopes or decimal values?

Yes. Decimal points or commas are accepted, and negative values represent downhill sections. Results keep the sign in angles and percentages so you can read the direction at a glance.

What precision do the results use?

Angles and grades are rounded to two decimals, while the hypotenuse and unit vector show three. Keep inputs in metres to avoid conversion mistakes.