A maps app can know where you are yet show your direction incorrectly. The location marker may be on the right street while its direction indicator points sideways, rotates while you stand still, or seems to face the wrong way.

That is possible because location and direction are different measurements. A phone can estimate its position from satellite navigation, Wi-Fi, mobile networks, and other information, while its compass heading depends heavily on sensing the magnetic field around the device.

Understanding that difference makes strange compass behavior easier to diagnose. The useful question is not only whether the phone knows where it is, but whether it can reliably tell which way it is facing.

Position and direction answer different questions

Imagine standing at a crossroads with your phone held in front of you.

Your position answers, “Where am I?” A navigation app can represent that as a point on the map.

Your heading answers, “Which direction am I facing?” The app may use that information to rotate an arrow, orient the map, or show which road is in front of you.

A correct position does not guarantee a correct heading. If the phone knows your location accurately but its direction estimate is disturbed, the map can place you at the correct crossroads while pointing the on-screen arrow toward the wrong street.

This distinction also explains why walking can sometimes make navigation seem more sensible. As your position changes, an app can infer your direction of travel from successive locations. That is useful while moving, but it is not the same as measuring which way the phone is pointing while you stand still.

A magnetometer senses the magnetic field around the phone

Phones that provide compass information typically include a magnetometer, a sensor that measures magnetic-field strength along several axes inside the device.

Earth has a magnetic field. By measuring the local field and combining that information with the phone’s orientation, software can estimate a direction relative to magnetic north.

The phone also needs to understand how it is tilted. A magnetic reading expressed along the phone’s own axes is not enough by itself when you can hold the device flat, upright, or at an angle. Systems can combine magnetic measurements with motion and orientation sensors, such as accelerometers and gyroscopes, to relate the phone’s orientation to the surrounding world.

The important mental model is that a digital compass is not detecting a distant point labelled “north.” It is measuring a weak magnetic field where the phone is located and using that measurement to calculate a heading.

That makes the result vulnerable to other magnetic fields nearby.

Nearby magnets can pull the reading away from Earth’s field

A magnetometer measures the magnetic field that actually reaches it. It cannot automatically assume that every part of that field comes from Earth.

A magnet in an accessory, a magnetic mount, or another object close to the phone can alter the local field. Ferromagnetic materials such as some forms of iron and steel can also distort a magnetic field even when they are not permanent magnets themselves.

Suppose your compass looks normal while you hold the phone in your hand, then swings to a different direction when you place it against a magnetic car mount. Your geographical position has not suddenly changed. The magnetic environment around the sensor has.

The same principle can apply near large metal structures, equipment that produces magnetic fields, or accessories containing magnets. The size of the error depends on the strength, position, and orientation of the interfering source, so there is no single distance at which every object becomes harmless.

Calibration helps the phone separate sensor bias from useful measurements

A real magnetometer does not produce perfect measurements. The phone itself contains materials and components that can introduce repeatable magnetic effects, and sensor readings can have offsets that need to be accounted for.

Calibration is the process of estimating and compensating for these kinds of measurement errors. The exact method depends on the device and operating system. Some systems perform calibration automatically as the device moves through different orientations, while an app or operating system may sometimes ask the user to move the phone in a particular pattern.

The familiar instruction to move a phone through several orientations is therefore not a ritual that “finds north.” Movement gives the system magnetic measurements from different directions, which can help it estimate biases affecting the sensor.

If your device explicitly asks for a calibration movement, follow the instructions shown on that device. Do not assume that one motion or menu procedure applies to every phone or software version.

Calibration also has limits. It can compensate for certain sensor biases, but it cannot make a compass reliable while a strong, changing source of magnetic interference remains beside the phone.

Magnetic north and true north are not exactly the same

There is another reason compass terminology can be confusing: magnetic north and true north are different references.

A magnetometer naturally responds to Earth’s magnetic field. A map, however, is normally oriented around geographic or true north: the direction along Earth’s surface toward the geographic North Pole.

The angle between magnetic north and true north at a particular place is called magnetic declination. It varies with location and changes gradually over time.

Software can account for declination when it has the information needed to do so. This is why a device or app may offer magnetic-north and true-north behavior, or use location information as part of its compass calculations.

For everyday troubleshooting, the key point is simpler: a difference between magnetic and true north is a normal property of Earth’s magnetic field, while a compass that suddenly swings when brought near an accessory suggests local interference instead.

Why the heading can move while the phone is still

A direction indicator that shifts slightly does not necessarily mean the phone is physically rotating.

Sensor measurements contain noise, and the magnetic environment can fluctuate. Software may filter or combine readings over time rather than treating every individual measurement as exact. Different apps and operating systems can also process sensor information differently.

A small amount of movement in the displayed heading can therefore be normal. Large jumps, persistent offsets, or readings that change dramatically near a particular object are more useful clues when troubleshooting.

How the phone is held can matter as well. Compass software needs a usable estimate of the device’s orientation to interpret magnetic measurements. Follow an app’s guidance about device position when it provides one rather than assuming every compass is designed to be read in exactly the same posture.

A wrong heading is not automatically a GPS problem

When a navigation arrow points the wrong way, it is tempting to describe the whole problem as “bad GPS.” That combines two different parts of navigation.

Satellite positioning can contribute strongly to the phone’s location and, when you are moving, to an estimate of your direction of travel. The compass function instead depends on orientation and magnetic sensing for a heading while the device is stationary or changing orientation independently of your movement.

This gives you a useful diagnostic split:

  • If your map position itself is far from where you are, investigate location accuracy and the app’s location access.
  • If your position is correct but the direction indicator is wrong, unstable, or reacts to nearby objects, investigate the compass side of the problem.

The two systems can influence the same navigation experience without having the same failure causes.

What to check when the compass looks wrong

Start by changing the magnetic environment before changing many software settings.

Move the phone away from magnetic mounts, cases or accessories that contain magnets, large metal objects, and electronic equipment that might be affecting the reading. Then compare the heading again in a different location. If the problem disappears when one object is removed, that is stronger evidence of local interference than repeatedly restarting the navigation app.

If the device or app reports poor compass accuracy or asks for calibration, follow its on-screen procedure. Calibration behavior varies, so use the instructions provided by your platform rather than relying on a universal sequence.

Also compare the symptom with your map position. A correct location with a bad heading points you toward a different class of problem than an incorrect location and heading together.

Finally, remember that a phone compass is a consumer sensor affected by its environment. It is useful for orienting maps and everyday navigation, but it should not be treated as a precision directional instrument for tasks where a heading error could have serious consequences.

Conclusion

A phone can know where it is and still be unsure which way it is pointing because position and heading come from different information.

The compass relies on magnetic-field measurements combined with the phone’s orientation. Nearby magnets and metal can distort those measurements, calibration can correct some sensor biases, and software may also account for the difference between magnetic and true north.

When a direction indicator looks wrong, separate the problem into two questions: Is the location wrong, or only the heading? If only the heading is affected, changing the phone’s magnetic surroundings is often the most informative first test.