Phone compass inaccurate while charging? How to check
Compare your phone's compass while charging and unplugged, rule out nearby magnets and sensor permissions, and see whether the charger is affecting the heading.
Your phone points in the wrong direction when it is plugged in, or the compass heading changes as soon as you connect a charger. Nearby magnets, the cable, the phone's case, or a permission issue can all affect what you see. A single reading cannot identify the cause.
Compare the phone in the same place while charging and unplugged. The Sensors Test can show whether the compass reading changes consistently, and whether the phone responds as you turn it.
Compare the compass while charging and unplugged
- Open the Sensors Test on the phone you want to check. Allow sensor access if the browser asks, then find the compass or heading reading.
- Unplug the phone. Put it flat on a non-metal surface, away from speakers, laptops, magnetic cases, and other electronics. Hold it still for about 10 seconds and note the reading.
- Keeping the phone in the same place and orientation, connect the charger. Wait for the reading to settle, then note whether it changes or becomes unstable.
- Repeat the comparison at least twice. Keep the charger brick and cable in the same positions each time so you are changing only one thing.
- Turn the phone slowly through a full circle. The heading should respond smoothly. Repeat with the charger unplugged, then try moving the charging brick farther away while keeping the phone connected.
Do not expect the reading to match a map's direction exactly. A phone compass can show magnetic direction, and nearby magnetic materials can distort it. The useful clue is whether the same phone changes in the same conditions, not whether it gives a perfect north reading.
What the result means
The heading changes only when the charger is connected
The charger, cable, or a magnetic accessory may be disturbing the phone's compass. This is more likely if the change repeats when you connect the same charger and stops when you unplug it. It does not prove the charger is defective. Try moving the charging brick and cable away from the phone before replacing anything.
The heading is wrong both plugged in and unplugged
The charger is probably not the only cause. A magnetic phone case, a ring or wallet attachment, a metal desk, or a nearby speaker can affect the sensor. Move to a different spot and remove accessories before comparing again.
The heading jumps around even when the phone is still
Check for nearby interference first, then repeat the test in another room. If the reading remains erratic in several locations, the sensor may need calibration, or the browser may not be receiving a reliable sensor reading. A browser test can show behavior, but it cannot repair a sensor.
The Sensors Test does not show a compass reading
The phone or browser may not expose compass data to the page, or permission may be blocked. This alone does not mean the compass hardware is broken. Check the browser's permissions and try a supported browser on the same phone.
How to reduce compass interference
- Move the charger and cable away. Keep the charging brick and the length of cable away from the phone while comparing. A wired charger does not always cause a compass problem, but current in a cable and nearby magnetic parts can affect a sensitive sensor.
- Remove magnetic accessories. Take off magnetic cases, wallet attachments, mounts, and charging rings. Retest on a wood or plastic surface, not on a metal table or near a speaker.
- Try a different charger and cable. Keep the phone in the same position and change only the charger or cable. If the problem follows one particular setup, stop using it near the compass and check the accessory for damage.
- Calibrate the compass in the map app. If the app offers a calibration prompt, follow its instructions. Some phones ask you to move the device in a figure-eight motion. Calibration can improve orientation, but it will not cancel interference from a magnet held close to the phone.
- Check browser sensor access. On an iPhone, check Settings › Apps › Safari › Motion & Orientation Access. On older iOS versions, look under Settings › Safari. In Chrome on Android, check the browser's site settings for a motion sensor permission. Names and options vary by browser version.
- Restart and update the phone. Restart the phone, install available system and browser updates, then repeat the comparison. If the same sensor problem remains in different places and apps, contact the phone maker or a repair shop.
Why charging can affect a compass
A phone compass uses a magnetometer, a sensor that detects magnetic fields. A charger can place magnetic parts or electrical current close to that sensor. The phone may also be attached to a magnetic mount or case while it charges, so the charger is not necessarily the source of the disturbance.
Change one thing at a time to separate the causes: first remove the case, then move the cable, then try another charger. For more on nearby objects that can alter a reading, see why a compass behaves differently near metal objects.
If the compass stays inaccurate away from chargers, magnets, and metal surfaces, and the problem appears in multiple apps, the phone may need service. The Sensors Test can help document the symptom, but it cannot confirm a physical sensor fault.
