# Pocketlab Slope Converter (degrees, %, 1:n, mm/m) > Convert a slope between degrees, percent grade, 1 : n ratio and millimetres per metre. Converts a slope or tilt between the units builders, cyclists and DIYers use: degrees, percent grade, a 1 : n ratio, millimetres of rise per metre, or rise over run. Give a length to get the height difference over it and the length along the slope. The Pocketlab spirit level shows its readings in the same units. Part of usefulweb.app (https://usefulweb.app/). Part of [Pocketlab](https://pocketlab.usefulweb.app/) (ownerApp: pocketlab). Results are deterministic calculations from the inputs and the listed assumptions; the API returns exactly what the web page shows. ## Use it - Human interface: https://pocketlabslopeconverter.usefulweb.app/ (interactive tool at https://pocketlabslopeconverter.usefulweb.app/tool) - JSON API: POST https://pocketlabslopeconverter.usefulweb.app/api/v1/calculate with a JSON object of inputs (schema: https://pocketlabslopeconverter.usefulweb.app/api/v1/tool) - OpenAPI: https://pocketlabslopeconverter.usefulweb.app/openapi.json - MCP (Streamable HTTP): https://pocketlabslopeconverter.usefulweb.app/mcp - tool `pocketlab_slope_converter` ## Inputs - unit (select): I have the slope in - value (number): Value - Degrees, percent, n of 1 : n or mm per metre — as chosen above. Not used for rise and run. - rise (number): Rise - Only for rise and run: height difference. - run (number): Run - Only for rise and run: horizontal distance, same unit as the rise. - length (number): Horizontal length (optional) - Any unit; the height difference over it comes out in the same unit. ## Method - Every unit is turned into the angle θ: grade = tan θ × 100 %, a 1 : n ratio means tan θ = 1/n, millimetres per metre = tan θ × 1000, rise/run = tan θ. - Over a horizontal length L the height difference is L × tan θ and the length along the slope L / cos θ. The angle from the vertical (plumb) is 90° − |θ|.