Short answer

An accelerometer measures linear acceleration including gravity, in m/s². At rest, the total magnitude should read ≈9.81 m/s² (Earth's gravity) — this page shows that live per axis, with a gravity tilt-pad and an AT REST / FREE-FALL / IN MOTION badge. A reading far from 9.81 when still indicates a miscalibrated sensor.

Sensors / 03

Accelerometer.

Live acceleration on every axis, in m/s². Hold the device still to read Earth gravity (≈9.81 m/s²); the tilt pad shows which way gravity is pulling.

Notes

iOS asks for permission. Some browsers expose a higher-rate version via the new Accelerometer Web API — we use the broader DeviceMotion path.

Enable motion sensors

On iOS, tap below to grant motion access. Android and desktop start automatically.

Total magnitude · m/s²
—
Earth gravity at rest is ≈9.81 m/s². Drop or shake the device to spike it.
X axis
—m/s²
Y axis
—m/s²
Z axis
—m/s²
Bars clamped to ±20 m/s² · accelerationIncludingGravity
Gravity vector
The dot tracks the X/Y gravity tilt — center means screen-up and flat.
How it works

We subscribe to window.addEventListener("devicemotion", …) and read accelerationIncludingGravity live per event. Each axis updates its own signed bar in real time.

Total magnitude is computed as sqrt(x² + y² + z²). At rest this equals gravity (≈9.81 m/s²); the badge flags whether the live reading is at rest, free-fall, or in motion. Significant deviation at rest indicates calibration drift — restart the device.

Frequently asked

Why is the resting magnitude 9.81, not 0?

The accelerationIncludingGravity reading reports both motion acceleration and the constant pull of gravity. At rest on Earth, gravity is the only force — so the magnitude is Earth's gravitational acceleration: 9.81 m/s². A reading meaningfully below 9.7 or above 9.9 at rest signals a poorly calibrated sensor.

What's the difference vs the gyroscope?

Accelerometer measures linear acceleration (includes gravity). Gyroscope measures angular velocity (rotation rate). The OS fuses both to compute orientation — but on this page you're seeing the raw accelerometer output.

Why are X, Y, Z different on iPhone vs Android?

The axis convention differs by OS. iOS: X right, Y up, Z toward you. Android: same but Y down on some devices. The total magnitude is orientation-invariant though — that's the sanity check.

Can I use this to detect free-fall?

Yes. Free-fall reads near zero magnitude (gravity is the only force, but the device is falling with it, so its frame measures zero). Many phones use this to trigger 'phone dropped' alerts in lock-screen widgets.

Why does iOS ask for permission?

Same reason as the gyroscope — fine-grained motion data leaks micro-vibrations that can fingerprint or even act as a passive microphone. iOS 12.2+ requires one user gesture to unlock.