Polyatic Compass
All tools

Online compass

Hold your phone flat: the top edge points the way shown, to magnetic north or, with your location, true north. Switch on Qibla for the direction of the Kaaba.

– magnetic north

Magnetic
–
True
needs your location
Declination
–

No location yet, so the heading is magnetic. Your position is used on this device only and never sent.

Direction of the Kaaba in Mecca from your location

Level: waiting for the sensor.

Need a drawing compass for geometry? Use the compass and straightedge on /protractor/.

How to use the compass

  1. Open this page on your phone. On iPhone, tap Start compass and allow motion access; on Android it starts by itself.
  2. Hold the phone flat in front of you, screen up, top edge pointing away from you. Keep the level dot in the centre ring: a tilted phone reads less reliably.
  3. Turn yourself until the number shows the direction you want. 0° N means the top of the phone points north.
  4. For true north (the north on maps), tap Use my location, or type a latitude and longitude and tap Set. The page adds the declination for that spot.
  5. For the qibla, give your location the same way and switch on Qibla. A black square marker appears on the dial; turn until it sits under the lime pointer at the top, or follow the turn left / right line.
  6. To keep a direction, face it and tap Lock this bearing. The page then says how many degrees to turn left or right to get back on it.

Magnetic north, true north and the declination

A compass needle lines up with the Earth's magnetic field, which does not point at the North Pole. The angle between the two is the declination: east when magnetic north lies east of true north, west when it lies west. It depends on where you stand and it drifts every year, so a map's printed value goes out of date. This page computes it on your device from the World Magnetic Model 2025, the model NOAA and the British Geological Survey publish for 2025 to 2030, using its 12th-degree coefficients exactly as NOAA ships them. We checked our implementation against all 112 rows of NOAA's published WMM2025 test values: every declination agrees to 0.01°.

Worked example: in New York the declination in late 2026 is about 12.5° W. Face what the phone calls magnetic north (0°) and your true heading is 0 − 12.5 = 347.5°, so true north is 12.5° to your right. In Sydney (about 12.8° E) the same reading is 12.8° true; in London (about 1.2° E) the two norths are almost the same. Over a kilometre of walking, a 12.5° error puts you about 220 m to the side.

The qibla: the direction of the Kaaba from where you are

Switch on Qibla with a location and the page works out, on your device, the direction of the Kaaba in Mecca (21.4225° N, 39.8262° E) as a bearing from true north to 0.1°, and how far away it is. The formula is the standard initial great-circle bearing: the direction you would start walking along the shortest path over the Earth's surface, the path a string stretched tight across a globe would take. The distance is the length of that path (haversine formula, mean Earth radius 6,371 km).

Worked examples from this page's code: from New York the qibla is 58.5°, north-east, 10,306 km (6,404 mi) away. That surprises people who look at a flat world map, where Mecca lies a little south of due east of New York (a constant-heading line on that map runs at about 101°); on a globe the shortest path leaves New York heading north-east, over the Atlantic towards Europe. From London it is 119.0° (4,794 km), from Jakarta 295.2°, that is 64.8° west of true north (7,920 km), and from Sydney 277.5° (13,236 km).

Without a compass sensor (a laptop, or a phone whose browser hides it) you still get the bearing and a small diagram: face 58.5° east of true north. To use it without the sun, find true north another way, for example a map app's map turned so its streets line up with the street in front of you, or a magnetic compass with the declination above added, then turn that many degrees clockwise (east) or anticlockwise (west). A quarter turn is 90°, so 58.5° is about two thirds of a quarter turn.

At the point exactly opposite the Kaaba on the globe (near 21.4° S, 140.2° W, in the South Pacific) every direction is equally short, and the page says so instead of showing a bearing.

What it cannot do

  • Magnets, phone cases, cars and steel throw it off. A magnetic clasp or a case with a magnet, a car body, a steel desk, rebar in a floor or a speaker can swing the reading by tens of degrees. Step away from them and recalibrate with a figure-8.
  • A few degrees is the best a phone does. Phone magnetometers are small and drift; even after calibrating, expect a few degrees of error, more when the phone is tilted or the sensor reports poor accuracy.
  • Not for navigation where safety depends on it. For hiking off trail, boating or flying, use a real compass and a map, and treat this page as a check.
  • It needs a phone or tablet with a compass sensor that the browser shares. Laptops and desktops have none: the page says so and draws no needle. Some browsers report only relative turning, with no north, and the page says that too.
  • True north is only as right as the location you give and the model: the World Magnetic Model describes the Earth's main field, not local rocks, buildings or magnetic storms. Near the magnetic poles (far northern Canada, Antarctica) a compass is unreliable; NOAA marks those areas as blackout zones. The model is valid from 2025.0 to 2030.0.
  • On Android the heading is corrected when the screen rotates; on iPhone hold the phone upright in portrait.
  • The qibla marker is only as good as the compass. A few degrees of phone error, a nearby magnet or steel, or a wrong location moves it the same way; true north, and so the qibla, needs your location. Recalibrate with a figure-8 and step away from metal.
  • If your local mosque faces another way, follow your mosque. This page uses the great-circle (shortest-path) direction; some communities follow a different convention.
  • It is a direction finder, not a religious ruling, and it shows no prayer times.

Privacy

Nothing leaves your device. The sensor readings and your position stay in this page: the declination is computed here, the location is only asked for when you tap the button, and nothing is saved. The page sends an anonymous page-view count and one of three fixed words, compass-open, compass-true and compass-qibla, never a heading, a qibla bearing or a coordinate.

Questions

How do I find north with my phone?

Open this page on the phone, hold it flat in front of you with the top pointing away, and turn your body until the reading shows 0° N. The top of the phone then points north. On iPhone, tap Start compass and allow motion access first. Tap Use my location (or type a latitude and longitude) to point at true north instead of magnetic north.

Is this a live compass?

Yes. The heading updates every time the phone's sensor reports, many times a second, and the page averages the last few readings so the number does not flicker. The average is taken around the circle, so it does not swing through south when you face north and the reading crosses from 359° to 0°.

Which direction am I facing?

The big number is the direction the top edge of the phone points, in degrees clockwise from north, with its name: 0° N, 45° NE, 90° E, 180° S, 270° W and the 16 points between. Hold the phone flat and upright in portrait. Tap Lock this bearing to keep a direction; the page then tells you how many degrees to turn left or right to get back on it.

What is the difference between true north and magnetic north?

True north is the direction of the North Pole, the north on maps. Magnetic north is where a compass needle points, and the angle between the two, the declination, depends on where you are and changes every year. In New York it is about 12.5° W in late 2026, in London about 1.2° E and in Sydney about 12.8° E. This page works it out for your position with NOAA's World Magnetic Model 2025 and adds it to the magnetic heading.

How do I find the qibla direction from my location?

Tap Use my location (or type a latitude and longitude and tap Set), then switch Qibla on. The page shows the direction of the Kaaba in Mecca in degrees from true north, to 0.1°, the distance in km and miles, and a black square marker on the dial. On a phone, turn until the marker sits under the lime pointer at the top, or follow the turn left / right line. Without a compass sensor, find true north another way and turn the stated number of degrees east or west. It is the shortest-path (great-circle) direction; if your local mosque faces another way, follow your mosque.

Why does it say this device has no compass sensor?

Laptops and desktop computers have no magnetometer, and some phones or browsers do not share it with web pages. If no orientation reading arrives within 2 seconds the page says so and draws no needle rather than a made-up one. On a phone, try Chrome on Android or Safari on iPhone, and on iPhone tap Start compass and allow motion access.

Made with AI tools. · Privacy