Guide

How Does a Compass Work? Magnetic North Explained

A magnetic needle turns to align with Earth's magnetic field. A phone measures that field electronically. Neither should be confused with GPS.

Updated October 25, 2026

Published by Online Compass · Accuracy and testing

A magnetic compass works because its magnetized needle turns to align with Earth’s magnetic field. The marked north-seeking end provides a north reference, and a circular scale lets you express other directions as bearings.

The needle is a small magnet. It is not attracted to the printed letter N on the dial, and it does not need a GPS connection or electricity to turn.

Earth supplies the magnetic reference

Earth has a magnetic field generated largely by the movement of electrically conducting material in its outer core. Near the surface, that field has both horizontal and vertical components.

A freely turning compass needle responds to the field around it. For ordinary land navigation, its horizontal alignment supplies the magnetic north reference. The field is not a perfect, fixed bar magnet centered on Earth’s rotation axis.

That distinction matters: a compass follows the local field direction, not a direct line on a map drawn from your position to a single magnetic-pole coordinate.

Why does the needle turn?

When a magnet is at an angle to an external magnetic field, it experiences a turning force, or torque. A compass supports its needle so that it can rotate with little friction. The needle settles near alignment with the field rather than remaining in whatever direction you last held the housing.

Turn the baseplate while keeping the compass level and the needle tends to maintain its north-south orientation. This relative movement is what lets you compare the housing’s direction with north.

Liquid in many hiking-compass housings damps movement so the needle settles more smoothly. It does not supply the north reference.

Why magnetic north and true north differ

True north is the direction toward the geographic North Pole along Earth’s surface. Magnetic north, in the context of a compass reading, is the northward direction of the local magnetic field.

The angle between them is magnetic declination. It varies with place and time, so there is no universal correction such as “always add ten degrees.”

For example, if local magnetic north is 8° east of true north, a magnetic bearing of 0° corresponds to a true bearing of 8°. That example illustrates the reference difference; it is not a correction to use at your location.

Read magnetic vs. true north before combining compass readings with a map.

How does a phone compass work?

A phone compass usually uses a magnetometer, an electronic sensor that measures the magnetic field along three axes. Software can combine it with accelerometer and gyroscope measurements to estimate orientation and account for tilt.

Unlike a physical needle, the electronic sensor does not visibly rotate. The application turns the measurements into a displayed heading.

In a browser, sensor access depends on the device, operating system, browser and permissions. Orientation events are not automatically a trustworthy compass reading: relative rotation values alone do not establish north. The browser must provide a usable north-referenced measurement.

You can try the online compass on a compatible phone. A Manual exploration display is a demonstration, not evidence that the device has measured north. Our accuracy and testing page explains what the tool does and does not establish.

Is a compass the same as GPS?

No. A compass reports a direction. A GPS receiver estimates a position from satellite signals.

GPS-based software can estimate a course over the ground from movement, which is different from knowing where a stationary phone points. Some specialized multi-antenna receivers can measure heading, but that is not what a basic phone magnetometer does.

A map application may combine location, movement and compass readings. That combined display does not make the underlying measurements interchangeable.

What can make a compass wrong?

CauseWhy it matters
Nearby magnets or electric equipmentTheir fields can compete with Earth’s field
Steel objects, vehicles or structuresThey can distort the local field
Tilt or a sticking physical needleThe needle may not rotate freely
Phone sensor calibration problemsThe estimated field and heading may be biased
Wrong north referenceA correct magnetic reading can still disagree with a true- or grid-north map

Do not treat calibration as a way to cancel every nearby magnetic object. Move away from interference first. Near the magnetic poles, the weak horizontal component of the field also makes ordinary compass headings less reliable.

From the field to a useful reading

Once you have a north reference, bearings run clockwise around the dial: east 90°, south 180° and west 270°. The compass directions chart shows the intermediate points.

To interpret a physical dial, continue to how to read a compass. To measure and follow a bearing, see how to use a compass.

References

Frequently asked questions

Does a compass need electricity?

An ordinary magnetic needle compass does not need a battery. Its magnetized needle responds to Earth's magnetic field. An electronic compass, including a phone compass, needs power for its sensors and display.

Does a compass point to true north?

A basic magnetic compass aligns with the local magnetic field rather than geographic north. The angle between magnetic and true north is called magnetic declination. Some electronic compasses can apply a correction.

Does a compass work indoors?

It can, but steel structures, speakers, appliances and magnets can distort the local magnetic field. Compare readings away from likely interference rather than assuming an indoor reading is accurate.