Sensor Test: Gyroscope, Accelerometer & Compass

Check the motion sensors in your phone or tablet: a bubble level built on the accelerometer, a guided axis check, a compass sweep, and a drift measurement taken while the device lies still. Everything runs in the browser.

Waiting for the first reading

Pick the device up and move it. Nothing is claimed about a sensor until it has actually reported something: a browser exposes the same events on a desktop with no accelerometer anywhere in it, and fills them with nulls.

No accelerometer reading yet

A bubble level needs gravity, and gravity arrives with the accelerometer. Move the device, or check that motion access is allowed above.

Open this page on the device you want to test. A desktop computer has none of these sensors, and no browser will invent them.

How to Test Your Phone's Sensors

A phone's motion sensing is three separate parts pretending to be one: a chip that feels which way is down, a chip that feels turning, and a chip that feels the earth's magnetic field. Each fails on its own, in its own way, and each is checked separately above.

Accelerometer, gyroscope, magnetometer

The accelerometer measures force, which at rest is gravity — that is how a phone knows which way up it is, and on its own it is enough for screen rotation and a step counter. The gyroscope measures turning, and it is what carries a camera through a fast pan or a headset through a head movement, because it responds in milliseconds where gravity takes a moment to settle. The magnetometer measures the earth's field and gives the other two a north to hang on. Cheaper phones ship an accelerometer alone; when a game says your device is unsupported, the gyroscope is usually what it is missing.

Why a bubble level can be wrong

Every accelerometer has an offset — a small constant it adds to whatever it measures — and the phone subtracts a factory value for it. Drop the phone, or have the screen replaced, and the sensor's frame shifts relative to the housing it was calibrated against, so the correction no longer matches. The result is a level that reads a degree or two off on a surface that is perfectly flat, and no single reading can reveal it. Turning the device end for end is what separates the two, and it is what the check above does.

Gyroscope drift

A gyroscope at rest reports a small non-zero rotation, and everything built on it has to keep subtracting that number. While the number is stable, subtracting works and nobody notices. When it grows — with age, with temperature, after a knock — the correction lags behind it, and you get a camera that creeps in a game, a compass that turns while the phone sits still, and a headset whose world slowly rotates. Twenty seconds of doing nothing is enough to measure it.

Compass faults are usually not the compass

A magnetometer measures a field of about half a gauss, and almost anything nearby is stronger: a case with a magnetic clasp, a car dashboard mount, a speaker, a laptop lid, steel in a floor. Most of what looks like a broken compass is interference, and the figure-of-eight gesture map apps ask for is the phone rebuilding its correction from a fresh set of directions. A compass that sticks — a heading that jumps rather than sweeping — is the shape of the real fault, which is why the test above is a full turn rather than a single reading.

After a repair

The sensors sit on the mainboard, and the frames they are calibrated against belong to the housing. A screen replacement, a battery swap, or a case that has been sprung open and closed can move both. A level that suddenly reads off, a compass that needs recalibrating constantly, and a gyroscope that drifts where it did not before are all worth checking together on a device that has just been opened.

Why an iPhone asks first

Motion readings can be used to work out what somebody is typing, and to identify a device by the exact imperfections of its sensors, so WebKit stopped handing them out for free: on iPhone and iPad a page has to ask, from a real tap, over https. Chrome on Android does not ask, which is why this page shows a button on one and not on the other. Either way the readings stay in the page — nothing here is sent anywhere.

Testing the screen itself?
Check multi-touch, sweep the glass for dead zones and catch ghost touches.
Open the touch screen test
Using a stylus?
Check pen pressure, tilt, jitter and palm rejection right in the browser.
Open the stylus test

Frequently asked questions

Open the Motion & axes panel above and turn the device: the rotation bars answer immediately where a gyroscope is present and stay flat where it is not. Then run the drift test — lay the phone down for twenty seconds and see what it reports while doing nothing at all. A gyroscope that answers when turned but drifts while still is the common half-failure, and it is the one that spoils games, VR and image stabilisation.
Probably not. Plenty of budget phones and a good number of tablets ship an accelerometer and nothing else — enough for screen rotation and step counting, not enough for VR or for the games that ask for it. If the device definitely used to have one, try another browser first: Firefox and some in-app browsers pass on less than Chrome and Safari do.
Run the two-position check above first, because a degree of table is far more common than a degree of sensor. If the offset survives the turn it is in the phone: lay it on a flat surface and restart it, which is when most systems recompute the correction. Some Android manufacturers also expose a sensor calibration in their diagnostics app. Past that it is a hardware calibration, and no web page can perform one.
Because the phone does not trust its own answer. The magnetometer builds its correction from readings taken in different directions, and it loses that near anything magnetic — a case clasp, a car mount, a speaker, a metal desk. Move away from all of it and wave the phone through a figure of eight. If it needs that constantly, suspect the case before the phone.
Because there is nothing to happen. Accelerometers, gyroscopes and magnetometers are phone and tablet parts; only a few convertible laptops carry any of them and desktops carry none. Browsers expose the same events either way and fill them with nulls, which is why this page waits for a real reading before claiming anything. Open it on a phone.
Motion readings can be used to infer what somebody is typing and to fingerprint a device, so WebKit requires a page to ask for them from a real tap over https. Chrome on Android hands them out without asking. The button on an iPhone is that request, and the grant survives a reload — but a refusal does not bring the prompt back, and it has to be re-enabled in Settings › Apps › Safari › Motion & Orientation Access.
No, and nothing on the web can. The proximity sensor — the one that blanks the screen during a call, and the most common complaint after a screen replacement — was removed from browsers years ago. The ambient light sensor is still defined but sits behind a Chrome flag that is off by default. Both are listed in the support panel above, so it is clear they are missing on purpose rather than untested.
Yes. Everything runs in your browser: no sensor reading leaves the page, nothing is stored, and there is nothing to install. It works the same on an iPhone, an Android phone or a tablet.