Home › Device & Internet Tests › Qibla Direction Finder

Qibla Direction Finder

Find the direction of the Kaaba in Makkah from where you are. Use your phone's location or pick a city to get the exact Qibla bearing in degrees, then press Start compass and turn until the arrow points straight ahead.

Last updated:

Qibla is 58.5° from north

Hold your phone flat and press Start compass

Compass not started: the dial shows north at the top.

Qibla direction (true north)–
With a magnetic compass–Enter your declination below
Distance to the Kaaba–
Rhumb-line bearing–Constant heading on a flat map, for comparison

Great-circle path to Makkah

Loading map…

Advertisement
Advertisement

How to use the Qibla Direction Finder

  1. Set your location: press Find my location and allow access, choose the nearest city, or type your latitude and longitude.
  2. Read the Qibla bearing: the number is degrees clockwise from true north (for example 58.5° from New York).
  3. Press Start compass on a phone and hold it flat, away from metal and magnets. On iPhone, tap Allow for motion access.
  4. Turn slowly until the green arrow points to the top of the dial and the message says you are facing the Qibla.
  5. Using a physical compass? Enter your local magnetic declination and follow the magnetic bearing instead.

Great circle versus rhumb line

There are two ways to draw a "direction" between two places. A great circle is the shortest route over the globe; its starting bearing is what this finder reports as the Qibla. A rhumb line keeps the same compass heading the whole way and appears as a straight line on a Mercator map, but it is longer. Near Makkah the two agree closely; far away they can differ by 40° or more, which is why the Qibla from North America is northeast and not southeast.

The calculation uses the Kaaba at 21.4225° N, 39.8262° E and the formulas:

  • Bearing: θ = atan2(sin Δλ · cos φ₂, cos φ₁ · sin φ₂ − sin φ₁ · cos φ₂ · cos Δλ)
  • Distance (haversine): d = 2R · asin(√(sin²(Δφ/2) + cos φ₁ · cos φ₂ · sin²(Δλ/2))), R = 6,371 km

Qibla direction from major cities

CityQibla (great circle, from true north)Rhumb-line bearingDistance to the Kaaba
New York58.5° ENE101.3°10,306 km (6,404 mi)
Chicago48.7° NE100.8°11,146 km (6,926 mi)
Houston45.5° NE93.9°12,574 km (7,813 mi)
Los Angeles23.9° NNE95.2°13,424 km (8,341 mi)
Toronto54.6° NE102.6°10,496 km (6,522 mi)
London119.0° ESE133.8°4,794 km (2,979 mi)
Paris119.2° ESE132.4°4,496 km (2,794 mi)
Istanbul151.6° SSE154.8°2,405 km (1,494 mi)
Cairo136.1° SE138.1°1,287 km (800 mi)
Lagos63.3° ENE67.1°4,251 km (2,642 mi)
Dubai258.2° WSW255.1°1,631 km (1,014 mi)
Karachi267.7° W262.2°2,800 km (1,740 mi)
Delhi266.6° W258.0°3,835 km (2,383 mi)
Dhaka277.6° W267.1°5,172 km (3,214 mi)
Kuala Lumpur292.5° WNW286.9°6,974 km (4,333 mi)
Jakarta295.2° WNW292.8°7,920 km (4,921 mi)
Tokyo293.0° WNW260.7°9,472 km (5,886 mi)
Sydney277.5° W297.5°13,236 km (8,225 mi)

Bearings are measured clockwise from true north: 0° north, 90° east, 180° south, 270° west. Within a city the direction changes by only a fraction of a degree.

Tips for finding the Qibla reliably

  • Calibrate first. Move the phone in a slow figure 8 a few times, then hold it flat at waist height.
  • Stay clear of metal. Steel desks, cars, speakers, laptops and magnetic phone cases can bend the reading by tens of degrees.
  • Cross-check with the sun. Twice a year the sun passes almost directly over the Kaaba: around May 27–28 at 12:18 and July 15–16 at 12:27 Makkah time (09:18 and 09:27 UTC). At that moment, wherever the sun is up, shadows point directly away from the Qibla.
  • Mark it once. For a home or office prayer space, find the direction carefully once and mark it with a landmark, such as a window or wall, rather than relying on a compass every time.
  • Need the prayer schedule too? See the prayer times calculator.

Frequently asked questions

How is the Qibla direction calculated?

The Qibla is the initial bearing of the great circle, the shortest path over the Earth's surface, from your position to the Kaaba at about 21.4225° N, 39.8262° E. The formula is θ = atan2(sin Δλ · cos φ₂, cos φ₁ · sin φ₂ − sin φ₁ · cos φ₂ · cos Δλ), where φ is latitude and Δλ the difference in longitude. The result is degrees clockwise from true north.

Why does the Qibla point northeast from the USA and not southeast?

On a flat map Makkah looks southeast of North America, but the Earth is round. The shortest path from New York to Makkah curves up over the North Atlantic, so the starting direction is about 58° (east-northeast). A constant southeast heading on a flat map, the rhumb line, is a longer route. Most scholars and Islamic organizations in North America use the great-circle direction.

How accurate is the phone compass?

Phone magnetometers are usually accurate to within about 5 to 10 degrees after calibration, but magnets, metal furniture, cars and phone cases with magnets can throw them off. Calibrate by moving the phone in a figure 8, and double-check the bearing with a landmark or a good physical compass if you are setting up a permanent prayer space.

What is magnetic declination and do I need it?

A compass needle points to magnetic north, which differs from true north by the declination: roughly −13° in New York, +12° in Los Angeles and close to 0° in much of Europe and the Middle East. The Qibla bearing is given from true north, so when you use a magnetic compass, enter your declination (east positive, west negative) to get the magnetic bearing to follow.

Why does the compass not work on my laptop?

Laptops and desktop computers have no compass sensor. You can still use the bearing in degrees with a handheld compass, or open the page on a phone or tablet to use the live dial.

How far am I from the Kaaba?

The distance shown is the great-circle distance on a sphere with the Earth's mean radius of 6,371 km. For example, New York is about 10,300 km (6,400 miles) from the Kaaba and London about 4,800 km (3,000 miles).

Is my location stored or shared?

No. Your position is used only in your browser to calculate the bearing. The last location you chose is remembered in this browser's local storage for next time and is never uploaded.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

Online CompassUse your phone as a compass with heading in degrees and cardinal points.Prayer TimesIslamic prayer times for any city or location, with method and madhab options and a monthly timetable.What Are My GPS CoordinatesSee your latitude and longitude in decimal and DMS, with accuracy and maps.Hijri Date ConverterConvert Gregorian dates to Islamic Hijri dates and back, with Arabic month and weekday names.Hijri CalendarMonthly Islamic (Hijri) calendar with Gregorian dates side by side, Islamic holidays and printing.Internet Speed TestMeasure download, upload, ping and jitter.What Is My IPSee your public IP address and location.Vibration TestTest your phone's vibration motor with short, long, SOS, heartbeat and custom patterns.Battery Status CheckerCheck your battery level, charging state and time to full or empty.Bubble LevelTurn your phone into a spirit level with surface and bar modes.Online ProtractorMeasure any angle on screen or in a photo with a draggable 360° protractor.Browser Feature CheckerTest which Web APIs, CSS features and JavaScript syntax your browser supports.Local Storage InspectorView, edit and clear the cookies, localStorage and other data this site stores in your browser.FPS TestMeasure your browser's live frame rate, 1% lows and frame times, and compare 15-240 FPS.GPU TestSee your graphics card, WebGL and WebGPU support and limits, and run a quick GPU benchmark.CPU BenchmarkTest your processor's single-thread and multi-thread speed in the browser and compare scores.Ping TestCheck your latency, jitter and packet loss to Cloudflare, Google and other servers live.Accelerometer TestCheck your phone's accelerometer and gyroscope with live values, graphs and a tilt ball.Browser Fingerprint TestSee how unique your browser is: canvas, WebGL, audio, font and screen fingerprints, run locally.WebRTC Leak TestCheck if WebRTC exposes your real public or local IP address, even behind a VPN.IPv6 TestTest whether your connection supports IPv6, see your IPv4 and IPv6 addresses and check any site.Sequence Memory TestWatch squares flash in a 3x3 grid and repeat the growing sequence. Track your best level.Visual Memory TestRemember which squares light up as the grid grows. Three lives, levels and score history.Ad Blocker TestCheck if your ad blocker works: bait ad elements and ad/tracker requests, with every result listed.Browser Notification TestCheck notification permission, request it and send test notifications with custom options.Browser Storage TestSee your browser's storage quota and usage, and test localStorage, IndexedDB and cookie limits.Device Info CheckerSee your device's OS, CPU cores, memory, GPU, screen, network, battery and sensors in one report.Gyroscope TestCheck your phone's gyroscope with live rotation readings, a 3D phone model and graphs.WebGPU TestCheck if your browser supports WebGPU, see adapter info, limits and features, and run a GPU benchmark.4K Video Playback TestPlay generated 1080p, 4K or 8K test clips and see decode speed, dropped frames and smoothness.Browser BenchmarkTest your browser's speed: JavaScript, DOM, Canvas, WebGL, JSON and regex scores in one run.Bufferbloat TestMeasure lag under load: idle vs loaded latency, graded A+ to F with a latency chart.Cloud Ping TestPing AWS cloud regions worldwide from your browser and find the lowest-latency data center.Fake Flash Drive CheckerFill a USB drive or SD card with test data and read it back to expose fake capacity and bad memory.GPS SpeedometerLive GPS speed in mph, km/h or knots with max, average, trip distance and HUD mode.Am I Connected to the InternetCheck if your internet really works: tests several servers, latency and captive Wi-Fi portals.USB Drive Speed TestMeasure USB flash drive and SD card write and read speed in MB/s, right in your browser.Video Codec Support CheckerCheck H.264, HEVC, VP9 and AV1 support at 1080p, 4K, 8K and HDR, with hardware decode hints.Is JavaScript Enabled TestCheck instantly if JavaScript is enabled, see your JS engine and get how-to-enable steps.Online PedometerCount steps with your phone's motion sensor: distance, calories, cadence and saved sessions.Reading Speed TestTime how fast you read a passage, answer comprehension questions and compare with adult averages.Online Serial PlotterPlot live numbers from Arduino, ESP32 or any USB serial device as a multi-line chart.Bluetooth Device ScannerFind nearby Bluetooth LE devices and read their services, characteristics and battery level.What Is My ElevationSee your current elevation above sea level in feet and meters from GPS and terrain data.What Is My Time ZoneSee your time zone, UTC offset, abbreviation and daylight saving status instantly.Are Cookies Enabled TestCheck if cookies, localStorage and sessionStorage work in your browser, with fix steps.Dual N-Back TestWorking memory training: match squares and spoken letters from N steps back, with auto-levels.GPS Route TrackerRecord a walk, run or ride on a map: distance, time, pace, elevation, GPX and KML export.
See all 46 Network, Browser & System Tests →