Methodology
How prayer times, Qibla direction and Hijri dates are calculated, with sources for every method.
Qibla direction calculation
QiblaWeb uses the initial great-circle bearing from the user's latitude/longitude to the Kaaba. The Kaaba coordinates used in the current release are:
lat = 21.422487lng = 39.826206
The bearing is normalized to 0–360° clockwise from true north. The displayed value is a calculated bearing, not a compass reading. On a phone, compass accuracy depends on calibration state and proximity to metal/electronics.
Verification: The formula passes 10 reference-city fixtures within ±0.5° (London, New York, Istanbul, Jakarta, Paris, Dubai, Kuala Lumpur, Sydney, Cairo, Tayibe).
Prayer time calculation
QiblaWeb uses the audited adhan library by batoulapps for all prayer-time calculation. When using the user's location, the computation runs in the browser — coordinates are never sent to the server. adhan-js source.
Supported methods
| Method | Fajr angle | Isha | Common region |
|---|---|---|---|
| MWL (Muslim World League) | 18° | 17° | Europe, Far East |
| ISNA (Islamic Society of North America) | 15° | 15° | North America |
| Umm al-Qura, Makkah | 18.5° | Maghrib + 90 min (120 in Ramadan) | Saudi Arabia, Arabian Peninsula |
| Egyptian General Authority | 19.5° | 17.5° | Africa, Syria, Lebanon, Malaysia |
| University of Islamic Sciences, Karachi | 18° | 18° | Pakistan, India, Bangladesh |
Asr school
Asr is when shadow length equals (noon shadow) + (factor × object height). Factor = 1 for Shafi/Maliki/Hanbali (standard), 2 for Hanafi.
Known limitations
- At high latitudes where the sun does not reach the Fajr/Isha angles, a middle-of-night fallback is used. The UI explains the chosen rule.
- Always follow your local mosque's timetable when it differs. The calculation does not apply local adjustments.
- Calculations run through the audited adhan library, but no mathematical method replaces local mosque verification.
Hijri date calculation
QiblaWeb uses the tabular Umm al-Qura algorithm for date conversion. Local moon-sighting can differ by ±1 day. Every Hijri page therefore carries an appropriate disclaimer.
Sources
- AlAdhan — Prayer calculation methods
- Great-circle initial bearing formula
- PrayTimes.org — algorithm reference
Local mosques may use local adjustments. Follow your community when applicable.