Search for a tool
Slope Calculator

Tool/Calculator to find a slope/grade value (of a road, a roof, a construction, a frame, etc.) from its height or width or length or distance etc.

Results

Slope Calculator -

Tag(s) : Geometry

Share
Share
dCode and more

dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!


Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!


Feedback and suggestions are welcome so that dCode offers the best 'Slope Calculator' tool for free! Thank you!

Slope Calculator

Slope/Grade Calculator

Please fill at least 2 items from this diagram slope
NB: Use the same unit (m, cm, etc.) for all distances (the result will be in this same unit)







Answers to Questions (FAQ)

What is a slope? (Definition)

Slope is a measure of the inclination or decline of land, road or surface. It indicates the variation in height in relation to a distance traveled.

Slope is generally measured in percentage (a slope of 30%, or a rise/change of 30 units for a run horizontal distance of 100 units).

By extension, some call slope, the angle $ a $ (a slope of 15 degrees).

How to calculate a slope (in percentage)?

The slope $ p_\% $ (in % percent) is calculated by the ratio of the height $ h $ by the width $ w $ (multiplied by 100 to get a percentage): $$ p_\% = 100 \times \frac{h}{w} $$

Example: Calculate the slope for a vertical distance of 10m and a horizontal distance of 50m: $ p = 10/50 = 0.2 $ or $ 20% $

How to calculate a slope (in degrees)?

The slope $ p° $ (in ° degrees) is calculated by trigonometric functions: $$ p° = \arctan \left( \frac{h}{w} \right) \times \frac{180}{\pi} $$

Example: Calculate the slope for a vertical distance of 10m and a horizontal distance of 50m: $ p° = \arctan(10/50) \approx 0.19 \text{ rad} \approx 11.3° $ (multiply radians by $ 180/\pi $ to get a value in degrees)

How to convert a slope (percentage <-> degrees)?

The formula for converting slope from degrees to percentage is:$$ p° = \arctan \left( p_\% / 100 \right) \times \frac{180}{\pi} $$

The formula for converting slope from percentage to degrees is: $$ p_\% = 100 \tan( p° \times \frac{\pi}{180} ) $$

What is a negative slope?

A positive slope (or grade) indicates that the land rise or is rising in the chosen direction (positive height difference), while a negative slope indicates that the land is falling or falling in the chosen direction (negative height difference).

How to interpret a slope of 0%?

A grade/slope of 0% means that there is no significant vertical change in the distance traveled. This is equivalent to flat land (no elevation).

What are the formulas for finding each value in a slope calculation?

The following equations allow us to find $ d $, $ h $, $ w $ from the angle $ a $ (in degrees)

$$ d = w / \cos(a \pi/180) $$

$$ h = d \sin(a\pi/180) = w \tan(a \pi/180) $$

$$ w = h / \tan(a \pi/180) $$

From the slope $ p_\% $ in percentage:

$$ d = w / \cos(\arctan( p_\% / 100 ) ) $$

$$ h = d \sin( \arctan( p_\% / 100 ) ) = w \tan( \arctan( p_\% / 100 ) ) $$

$$ w = h / \tan( \arctan( p_\% / 100 ) ) $$

Source code

dCode retains ownership of the "Slope Calculator" source code. Any algorithm for the "Slope Calculator" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Slope Calculator" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "Slope Calculator" or any other element are not public (except explicit open source licence like Creative Commons). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.

Cite dCode

The content of the page "Slope Calculator" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source. Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).
To cite dCode.fr on another website, use the link: https://www.dcode.fr/slope-calculator
In a scientific article or book, the recommended bibliographic citation is: Slope Calculator on dCode.fr [online website], retrieved on 2025-04-16, https://www.dcode.fr/slope-calculator

Need Help ?

Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!

Questions / Comments

Feedback and suggestions are welcome so that dCode offers the best 'Slope Calculator' tool for free! Thank you!


https://www.dcode.fr/slope-calculator
© 2025 dCode — The ultimate collection of tools for games, math, and puzzles.
 
Feedback