Blog

Compass heading drift: what it means for map directions

Learn why a phone compass heading drifts, how to test it in your browser, and what to change before trusting map directions.

Ryan MitchellHardware tests 6 min read

Your map arrow points the wrong way, spins while you stand still, or changes direction when you tilt your phone. That can make it hard to tell which way to walk, especially when you first open a map or leave a building.

A compass reading can drift because of nearby metal or magnets, movement, or a sensor that needs recalibration. Test the phone itself with the Sensors Test, then compare what you see with the map app. The test checks whether compass readings respond to your device, but it cannot prove that every map app is using them correctly.

Test the compass heading

  1. Open the Sensors Test on the phone whose compass you want to check. A desktop computer usually does not have a compass sensor.
  2. If the browser asks for permission to use motion or location-related sensors, allow it for the test. If no compass readings appear, check the browser's site permissions or try a browser that supports sensor access.
  3. Set the phone flat and still, away from a laptop, speaker, car, metal table, magnetic case, or magnetic phone mount. Watch the compass reading for about 10 seconds.
  4. Turn the phone slowly in a full circle while keeping it level. The heading should change smoothly as the top edge of the phone turns, then settle when you stop.
  5. Move a few feet away from nearby objects and repeat. Compare the test with the direction indicator in your map app, making sure the phone is held in the same position.

Use the same phone orientation for each comparison. A compass reports the direction the phone is facing, not the direction of your destination. If you tilt the phone or turn it in your hand, the heading can change even though you have not moved to a different place.

What the result means

The heading changes smoothly when you turn the phone

The compass sensor is responding. If the map still points the wrong way, check whether the map is set to keep north at the top or rotate with your direction of travel. Some map apps also show a separate location arrow and compass indicator, and those markers do not mean the same thing.

The heading jumps or wanders while the phone is still

The sensor may be getting disturbed by a nearby magnetic field, or its readings may be noisy. A small amount of movement is not proof of a fault. Move away from metal and electronic equipment, set the phone flat, and repeat the test. If the reading steadies there, the surroundings were probably affecting it.

The heading changes when you tilt the phone

The phone is measuring its orientation in three dimensions, and a tilt can affect the displayed direction if the sensor data is not well calibrated. Repeat the test with the phone level. If the map app shows a calibration prompt, follow it; many phones ask you to move the device in a figure-eight pattern.

No compass reading appears

This does not automatically mean the compass is broken. The phone may not expose the sensor to that browser, or permission may be blocked. Browser sensor access can vary by device and browser, as explained in what sensors a web page can access.

The test looks steady, but the map arrow is wrong

The sensor may be working while the map app has a separate issue. Check its orientation setting, close and reopen the app, and see whether it asks you to calibrate. When you are moving, some apps can estimate direction from your movement instead of relying only on the compass, so a stationary reading and a walking arrow may not match.

How to reduce compass drift

  1. Move away from magnets and metal. Take the phone out of a magnetic car mount or case and test it away from speakers, laptops, steel furniture, and the car body. A nearby magnetic field can pull the reading off course.
  2. Hold the phone level. Keep it flat while checking the direction. If you are walking, avoid judging the heading while the phone is tilted sharply or swinging in your hand.
  3. Calibrate when the map app asks. Follow the directions shown by the app. A figure-eight motion is a common calibration method, but the exact prompt depends on the phone and app.
  4. Check sensor access in the browser. On Android, open the browser's site settings for the page and allow motion sensor access if that option is available. On iPhone, check Settings › Safari › Motion & Orientation Access when using Safari, then reload the test page. Names and availability can vary by iOS version and browser.
  5. Restart the map app and phone. Close the app completely, reopen it, and retest. Restarting can clear a temporary sensor or app problem, but it will not fix magnetic interference from an accessory.
  6. Compare another map app or browser. If the compass behaves normally in the Sensors Test but one map app points incorrectly, the issue is more likely in that app's settings or sensor handling than in the phone's compass.

Windows 11 PCs and Macs generally do not have a compass sensor, so there is no universal desktop compass calibration setting to change. For a phone heading problem, test on the phone itself rather than relying on a laptop browser.

When the compass may be faulty

Suspect a hardware problem if the heading remains erratic in different locations, with the phone level and away from magnetic objects, and the same behavior appears in more than one app. Restart the phone and repeat the test before deciding. If it still fails, check the phone maker's support guidance or ask a repair shop to inspect the sensor. A browser test can show inconsistent readings, but it cannot identify a damaged component by itself.

Why a compass and a map can disagree

A phone compass senses Earth's magnetic field, which points toward magnetic north. Map directions are often displayed relative to true north or to the direction you are traveling, and the app may adjust the compass reading to fit its map view. Buildings, vehicles, and magnetic accessories can also distort the field around the phone. That is why a heading can be useful as a quick orientation clue without being a precise survey instrument.

If the phone is stationary, GPS location alone usually cannot tell which way its top edge faces. For a steadier direction, hold the phone level, wait for the map indicator to settle, and confirm the route using visible landmarks. The behavior of phone sensors while stationary can also help explain why readings vary when the device is not moving.