Qibla Compass
The direction to the Kaaba in Mecca from your location.
N
E
S
W
How it works
The Qibla bearing is the initial great-circle direction from your location to the Kaaba. Using your latitude lat₁, the Kaaba's latitude lat₂, and the longitude difference Δlong:
θ = atan2( sin(Δlong) × cos(lat₂), cos(lat₁) × sin(lat₂) − sin(lat₁) × cos(lat₂) × cos(Δlong) )
The result θ is normalized to 0–360°, measured clockwise from true north. The needle on the compass above points toward that bearing, rotating with your device's orientation when available.