The astronomy and geometry behind the five daily prayers and the direction to Makkah.
Published August 29, 2026 · Reviewed by the Ihsabha Editorial Team
Every Muslim relies on two calculations daily: when to pray, and which direction to face. Both are rooted in precise astronomy and geometry rather than fixed clock times — here's exactly how each is worked out.
Each prayer time is tied to the sun's position relative to your specific location on Earth:
Because these calculations depend on the sun's exact position, prayer times shift every single day with the seasons, and vary significantly by latitude and longitude. This is also why different Islamic authorities — such as the Muslim World League, ISNA (North America), or Umm al-Qura (Saudi Arabia) — publish slightly different angle conventions for Fajr and Isha specifically, which can shift those two prayers by several minutes between methods.
The qibla is the direction every Muslim faces in prayer, toward the Kaaba in Makkah. Calculating it isn't as simple as "look toward Saudi Arabia on a flat map" — because the Earth is a sphere, the shortest path between two points curves. Qibla calculation uses great-circle navigation (spherical trigonometry) to compute the precise compass bearing from your exact coordinates to the Kaaba's coordinates, giving the true shortest-path direction — which, at some locations, points a noticeably different way than a flat-map straight line would suggest.
Ihsabha's Prayer Times Calculator gives you all five daily times based on your exact location and preferred calculation method, and the Qibla Direction Finder calculates your precise bearing to the Kaaba instantly — both without any manual astronomy or trigonometry.
From the sun's angle relative to your location — Fajr and Isha use solar angles below the horizon, Dhuhr is solar noon, Asr uses shadow length, and Maghrib is sunset.
Using great-circle (spherical trigonometry) navigation between your coordinates and the Kaaba's coordinates in Makkah.
Different authorities use slightly different Fajr/Isha angle conventions, shifting those two times by a few minutes depending on the method selected.
Calculated prayer times are highly accurate for the vast majority of locations, but always follow your local mosque's published schedule where one is available, since local authorities may apply adjustments for regional visibility conditions.