About this tool
Measure tilt and slope using your device's orientation sensor where supported.
This turns a phone into a spirit level and inclinometer by reading the DeviceOrientation sensor and logging the combined tilt off horizontal, computed as the hypotenuse of the front-back (beta) and left-right (gamma) angles. Each timestamped row keeps beta, gamma and alpha alongside that single tilt figure in degrees, so you can see whether a surface is off in one axis or both. It starts only after you press start and grant sensor permission, and readings never leave the browser.
Open Digital Level & Inclinometer on AltFTool — it loads instantly in your browser.
Paste your code or data sample into the workspace.
Pick the format, conversion, or analysis you need.
Copy the polished result straight back into your project.
The combined tilt is shown next to the raw beta and gamma, so a 3-degree reading tells you whether it is pitch, roll, or a bit of each.
The last 200 readings are kept with ISO timestamps, so you can sample several spots along a run and compare them afterwards.
The orientation listener is attached only when you press start, and it is fully removed when you stop.
Typically within about one degree once the phone is resting flat on the surface rather than held in your hand, which is fine for shelves, appliances and picture frames but not for machining or structural work. Accuracy depends on the device's accelerometer calibration, so check it against a known-flat reference before trusting a small reading.
Beta is front-to-back tilt and gamma is left-to-right tilt, both in degrees from the DeviceOrientation event; the tool reports the combined tilt as the square root of beta squared plus gamma squared. A surface reading 0 on both is horizontal in every direction.
Percent grade is the tangent of the angle times 100, so 1 degree is about 1.75%, and 2 degrees about 3.5%. For fall over a run, multiply the run by the tangent: a 1-degree slope drops roughly 17 mm per metre.
On iOS 13 and later the browser gives no orientation data at all until DeviceOrientationEvent.requestPermission() is accepted, which is what the start button triggers. Drift usually means the phone is being held rather than laid down, or the accelerometer needs recalibrating — set the device flat on a surface you know is level and see whether it reads near zero.