A map app can know your location correctly while the direction arrow points sideways. A compass app can also appear accurate in one place and drift badly in another. These problems make more sense once you separate two questions that phones answer in different ways: Where am I? and Which way am I facing?

Satellite navigation can help answer the first question. To estimate the second while you are standing still, a phone commonly relies on magnetic and motion sensors. Those sensors are useful, but the magnetic one can be disturbed by ordinary objects around you.

Understanding that distinction explains why moving a phone away from a car mount, speaker, metal desk, or magnetic accessory can sometimes fix a direction error even though your location never changed.

A phone compass measures a magnetic field

A traditional magnetic compass contains a magnetized needle that aligns with the surrounding magnetic field. A phone has no visible needle, but many phones contain a magnetometer: a sensor that measures magnetic field strength and direction along multiple axes.

Earth has a magnetic field. By measuring that field, the phone can estimate the direction of magnetic north relative to the device.

That raw measurement is only part of the job. The phone also needs to understand how it is being held. A device lying flat on a table has a different orientation from one held upright in front of you.

Phones therefore commonly combine magnetic measurements with information from motion sensors such as accelerometers and gyroscopes. An accelerometer measures acceleration and can also help determine the direction of gravity. A gyroscope measures rotation. Software can combine these sensor readings to produce a more useful estimate of device orientation.

The important mental model is simple: the compass is not receiving a direction label from a satellite. It is measuring the physical environment around the phone and interpreting those measurements.

Magnetic north is not exactly the same as true north

There are two meanings of north that matter here.

Magnetic north is the direction indicated by Earth’s local magnetic field. True north is the geographic direction toward the North Pole along Earth’s surface.

The angle between them at a particular location is called magnetic declination. Declination is not the same everywhere and changes gradually over time.

A compass or navigation app may compensate for declination when it has the information needed to do so. Whether an app displays magnetic north, true north, or offers a choice depends on the platform and application.

This means two direction readings can differ without either sensor being defective. Before comparing a phone with another compass, check whether both are using the same north reference if that setting is available.

Nearby magnetic fields can overwhelm the signal you want

A magnetometer does not have a special ability to measure only Earth’s magnetic field. It measures the magnetic field at the sensor.

That distinction matters because the phone is surrounded by other possible sources of magnetism. Magnets in accessories, speakers, cases, mounts, clasps, and other devices can alter the field near the sensor. Magnetized metal can do the same. Large metal structures and electrical equipment can also distort local magnetic measurements in some situations.

Imagine trying to identify a quiet background sound while someone plays music next to you. The analogy is not exact, but the practical problem is similar: the signal of interest is still present, yet a stronger nearby influence makes it harder to interpret.

This is why a compass can behave normally outdoors and then become unreliable when the phone is placed on a magnetic vehicle mount. The phone has not forgotten where north is. Its sensor is measuring a different local magnetic environment.

The error can change when you move or rotate the phone

Magnetic interference does not always produce a neat, fixed error such as exactly 20 degrees to the left.

The effect depends on the strength and direction of the unwanted field relative to the sensor. As you rotate the phone, the relationship between the phone, Earth’s field, and the interfering object can change. The displayed heading may therefore drift, jump, rotate unevenly, or settle on a direction that is simply wrong.

This is also why testing a compass in only one orientation can be misleading. A reading that looks plausible while the phone points north may still behave badly as the device turns through other directions.

Calibration helps the phone understand sensor errors

Magnetometers are affected not only by external fields but also by magnetic influences associated with the device itself. Software can estimate and compensate for some repeatable sensor offsets and distortions. This process is commonly described as compass calibration.

Calibration does not create a stronger Earth magnetic field, and it cannot make a magnet beside the phone disappear. Instead, it helps the system distinguish predictable sensor bias from the changing field it is trying to measure.

Some devices calibrate largely in the background as you move them. Others may prompt you to move or rotate the device in a particular way. The exact procedure varies by operating system, hardware, and app, so it is better to follow the instructions shown by the device than to assume one universal movement is required.

A familiar figure-eight motion is associated with compass calibration on some devices and apps, but it should not be treated as a guaranteed fix for every phone. If the real problem is a magnetic accessory or a strongly distorted environment, moving the phone in a figure eight while it remains beside that source will not remove the interference.

Location and heading can disagree

A common navigation symptom is a correct blue location dot paired with an incorrect direction cone or arrow.

This can happen because position and orientation are separate estimates. Satellite navigation, nearby networks, mobile networks, and other location methods can contribute to estimating where the phone is. The direction the device is facing can rely heavily on its magnetic and motion sensors, especially while you are stationary.

As a result, magnetic interference can damage the heading estimate without moving the location estimate by the same amount.

The reverse distinction is useful too. A compass can point north without knowing your geographic position. A basic magnetic heading does not require the phone to know which street or city it is on.

Movement gives navigation apps another clue

When you travel far enough for the phone to observe a change in position, navigation software can estimate your course over ground: the direction in which your position is moving.

Course and device heading are not necessarily the same thing. If you are walking north while holding the phone sideways, your movement is north even though the top of the phone points east. In a vehicle, the difference can be even clearer because the phone may be sitting at an angle in a holder.

Navigation systems can combine several signals, and the exact sensor-fusion methods vary. This is one reason a direction display may become steadier after you start moving even if it was uncertain while you were standing still.

Movement is not a universal cure, however. Position estimates have their own errors, and slow or irregular movement can make course harder to determine accurately. The practical point is that a navigation arrow may represent more than a simple magnetic compass reading.

Cases and mounts are worth checking first

If a phone’s heading suddenly becomes unreliable, start with the environment before assuming the sensor has failed.

Remove magnetic cases, wallets, mounts, rings, stands, or other attached accessories temporarily. Move away from large speakers, strong magnets, metal structures, and electrical equipment when practical. Then compare the compass again in a more open area.

This test is useful because it changes one important variable: the local magnetic environment.

If the heading becomes normal away from the object, the object was likely contributing to the problem. If nothing changes, the cause may instead involve calibration, software, the way the app interprets orientation, or a hardware problem.

Compare direction in a controlled way

When checking whether a phone compass is actually wrong, avoid using a vague visual guess such as “that road looks north.”

Instead, compare it with a known reference when possible. Keep magnetic objects away from both the phone and any reference compass. If the app can switch between true and magnetic north, make sure you know which reference it is displaying.

Rotate the phone slowly through several directions rather than checking only one heading. A healthy result should change consistently with the device’s rotation, although small fluctuations are normal and precision varies by hardware and environment.

If multiple compass or map apps show a similar error on the same device in the same place, that points more toward the sensor or environment than toward one app’s map display. If only one app behaves strangely, its settings or software may be the more useful place to investigate.

A compass is useful, but not infallible

A phone compass is an environmental sensor, not an absolute source of direction. It works by measuring a weak natural magnetic field while the device’s software also interprets its orientation. Nearby magnetic fields, metal, calibration state, sensor quality, and software choices can all affect the result.

For everyday navigation, the most useful response to a suspicious heading is usually straightforward: separate location from direction in your diagnosis, move away from possible magnetic interference, remove magnetic accessories for a test, follow any calibration guidance provided by the device, and compare the result in a clearer environment.

Once you know that the phone is measuring its surroundings rather than simply “getting north from GPS,” a wandering compass arrow becomes much easier to understand and troubleshoot.