Yes. Most modern smartphones contain a magnetometer, a small sensor that measures magnetic fields. It is the part that lets the phone’s compass work, and it also responds to nearby magnets. What it cannot do is detect every magnetic or metal object, and it is not a substitute for a dedicated instrument.
What the phone’s sensor measures
The sensor is usually a three-axis magnetometer, which reads the field along three directions. Most of what it measures is Earth’s field, which is roughly 25 to 65 microteslas at the surface. Many apps convert that reading into a compass heading. Some also display the raw field strength in microteslas.
What it can detect
- Earth’s magnetic field. This is the signal the compass uses.
- Nearby magnets. Speakers, magnetic mounts, some phone cases and fridge magnets all change the reading when they are close enough.
- Magnetized iron or steel nearby. The effect depends on the object’s size and distance from the phone.
- Electric currents. Power cables and other current-carrying wires produce magnetic fields, which can shift the reading.
What it cannot detect
- Nonmagnetic metals. Copper, aluminum and similar metals do not create a static magnetic field, so a phone’s magnetometer will not reliably find them.
- Weak or distant sources. The field from a small object falls off quickly with distance, so the phone only notices it up close.
- Buried objects. The sensor is not designed for that. Readers who ask “How deep can a magnetometer detect?” are usually thinking of buried objects, and a phone is not built to find them.
Testing it yourself
Open a compass or magnetometer app and watch the reading. Then bring a fridge magnet slowly toward the phone. The reading should change, and it should return to normal when you move the magnet away. Do the test away from any navigation you are depending on, and keep magnets away from the phone while you navigate, since they can throw the heading off.
Why readings drift
A phone’s sensor can be pushed off by:
- Steel structures, vehicles, rebar and power lines.
- Magnets in a case, a car mount or a speaker.
- Electronic devices or metal objects in a pocket or bag.
Calibrating the sensor usually helps. Many phones and apps ask you to move the device through a figure-eight pattern. If the reading still seems wrong, move away from the source of interference and check again. The causes are much the same as the usual compass navigation issues.
Using a phone as a compass
“Can I use my phone as a compass?” The short answer is often yes, for a quick heading in ordinary conditions. For real navigation, carry a magnetic compass as well. Batteries run out, cases and mounts can add interference, and a sensor can be wrong without any clear warning.