Accelerometer Test
Check that your phone or tablet's motion sensors work. Tap Start, allow motion access if asked, then tilt and shake the device to see live accelerometer, gyroscope and orientation readings, moving graphs and a ball that rolls as you tilt.
How to use the Accelerometer Test
- Open this page on your phone or tablet. Laptops and desktops usually have no motion sensor.
- Tap Start sensor test. On iPhone and iPad tap Allow when Safari asks for motion and orientation access.
- Tilt and shake the device and watch the X, Y and Z values, the graphs and the tilt ball respond.
- Check each axis: lying flat, Z should read about 9.8 m/s² (1 g) and X and Y close to 0.
- Press Record to capture readings, then Stop and download the CSV file.
Expected readings for a working sensor
Gravity gives every accelerometer a built-in reference of 1 g = 9.81 m/s². Hold the device still in each position below; the reading including gravity should be close to these values (within about ±0.3 m/s²).
| Device position | X | Y | Z | Total |
|---|---|---|---|---|
| Flat on a table, screen up | 0 | 0 | +9.81 | 1.00 g |
| Flat, screen down | 0 | 0 | −9.81 | 1.00 g |
| Upright in portrait | 0 | +9.81 | 0 | 1.00 g |
| On its left edge (landscape) | +9.81 | 0 | 0 | 1.00 g |
| Free fall (dropped) | 0 | 0 | 0 | 0.00 g |
Some browsers, notably older versions of Safari on iPhone, report the opposite sign, so a flat phone may show −9.81 on Z. That is normal. When the phone is still, linear acceleration (without gravity) and the gyroscope rotation rate should both stay close to 0.
Accelerometer vs gyroscope vs orientation
- Accelerometer: measures acceleration along X, Y and Z in m/s², including gravity. Used for screen rotation, step counting and shake gestures.
- Linear acceleration: the same reading with gravity removed by the phone, so it only shows movement.
- Gyroscope: measures rotation speed around each axis in degrees per second. Used for stabilisation, 360° photos, VR and motion controlled games.
- Orientation: angles the phone calculates by combining sensors. Beta is front-back tilt (−180° to 180°), gamma is left-right tilt (−90° to 90°) and alpha is the heading around the vertical axis (0° to 360°).
The total g-force is calculated as √(x² + y² + z²) ÷ 9.81 using acceleration including gravity.
Troubleshooting a sensor that does not respond
- On iPhone and iPad, motion data only flows after you tap Start and choose Allow. If you denied it, fully close the tab and reopen the page.
- Values that stay exactly at 0 or never change usually mean the sensor or its driver has failed; restart the phone and test again.
- If auto-rotate or step counting misbehaves but this test looks normal, check the app's own settings or recalibrate in your phone's settings.
- A gyroscope that drifts (rotation rate not near 0 while the phone lies still) can be recalibrated on many Android phones from a diagnostics menu or by restarting the device.
Frequently asked questions
How do I know if my accelerometer is working?
Lay the phone flat on a table. The acceleration including gravity should show about 9.8 m/s² on the Z axis and close to 0 on X and Y, and the total should read about 1.00 g. Stand the phone upright and the 9.8 should move to the Y axis; turn it on its side and it moves to X. If the numbers do not change or stay at 0, the sensor is not responding.
What is the difference between the accelerometer and the gyroscope?
The accelerometer measures linear acceleration, including the constant pull of gravity, in metres per second squared. The gyroscope measures how fast the device is rotating around each axis, in degrees per second. Orientation angles are calculated by the phone by combining these sensors, and often the magnetometer for the compass heading.
Why does nothing happen on my laptop or desktop?
Most laptops and desktop computers do not have a motion sensor, or the browser does not expose it. The test then shows that no sensor was found. Open the page on a phone or tablet; you can copy the link with the button on the page.
Why do I need to allow motion access on iPhone?
Since iOS 13, Safari only gives web pages motion and orientation data after you tap a button and choose Allow. If you tapped Don't Allow, close the tab completely and open the page again to be asked once more. The page must also be loaded over https.
What do the X, Y and Z axes mean?
With the phone held upright in portrait, X points to the right edge of the screen, Y points to the top of the screen and Z points out of the screen towards you. Rotation alpha is around Z, beta around X (tilting forward and back) and gamma around Y (tilting left and right).
What sample rate should my sensor have?
Browsers usually deliver motion events at about 60 times per second, the same as the screen refresh rate, even if the hardware sensor is faster. Some browsers deliver fewer events in power saving mode. A rate far below 20 Hz can make motion controlled web games feel jerky.
Is my sensor data sent anywhere?
No. All readings are processed in your browser and nothing is uploaded. Recordings are only saved when you download the CSV file yourself.