Prayer Time Calculator for a Local Masjid

Prayer times are tied to observable solar events. This project calculates them independently from astronomy rather than reading them from a prerecorded timetable or prayer-time website.
The Prayer Center location
Google satellite view centered on The Prayer Center of Orland Park, 41.589649 degrees north and 87.872240 degrees west. Google imagery and map-data attribution are preserved in the snapshot. Open the interactive satellite map. Snapshot captured July 25, 2026.
What this project calculates
For any date and location, the calculator determines the Sun's position and finds when it crosses the solar altitude or shadow condition associated with each prayer.
For the Orland Park Prayer Center, the named physical location is:
| Setting | Value |
|---|---|
| Name | The Prayer Center of Orland Park |
| Alias | Orland Park Prayer Center (OPPC) |
| Latitude | 41.589649 degrees north |
| Longitude | 87.872240 degrees west |
| Time zone | America/Chicago |
The original published Prayer Center schedule was independently reproduced with an effective Orland Park city profile of 41.6163, -87.8371. That separate coordinate remains available when exact agreement with the published schedule is required. Direct calculation at the physical building can differ by a minute on some dates because the final result is rounded.
The calculation method is:
| Event | Astronomical definition |
|---|---|
| Fajr | Sun at 15 degrees below the eastern horizon |
| Sunrise | Apparent solar altitude of -0.833 degrees |
| Dhuhr | Unadjusted local solar transit |
| Asr | Hanafi shadow factor of 2 |
| Maghrib | Sunset at apparent altitude -0.833 degrees |
| Isha | Sun at 15 degrees below the western horizon |
| Final display | Rounded to the nearest minute |
The astronomical inputs
The calculation begins with the geographic coordinates, calendar date, and local time zone. The date is converted to the astronomical Julian date and used to obtain the Sun's position for that day.
The important solar quantities are:
- Solar declination (
delta): the Sun's apparent angular position north or south of the celestial equator. - Equation of time (
E): the difference between uniform clock time and apparent solar time caused by Earth's axial tilt and elliptical orbit. - Latitude (
phi): the observer's angular position north or south of the equator. - Longitude (
lambda): the observer's east-west position, which shifts local solar noon within the civil time zone. - Time-zone offset (
Z):UTC-6during Central Standard Time andUTC-5during Central Daylight Time.
The calculator uses the IANA time zone America/Chicago, so daylight-saving changes are applied from time-zone rules rather than by hard-coding a single UTC offset.
Solar noon and Dhuhr
Solar noon is the moment the Sun crosses the local meridian and reaches its highest altitude of that particular day. In local clock hours it can be represented as:
D = 12 + Z - lambda/15 - E
Where:
Dis local solar noon.Zis the local UTC offset.lambdais east-positive longitude.Eis the equation of time in hours.
Dhuhr in this method is the calculated solar transit rounded to the nearest minute, with no additional precautionary minute added.
Solar noon is not normally exactly 12:00 PM. Longitude within the time zone, the equation of time, and daylight-saving time all move it relative to civil noon.
The general solar-altitude equation
After calculating solar noon, the calculator solves for the hour angle at which the Sun reaches a required altitude h:
H(h) = arccos[
(sin h - sin phi sin delta)
/ (cos phi cos delta)
]
H is measured in degrees. Earth turns approximately 15 degrees per hour, so H/15 gives the elapsed clock hours before or after solar transit.
The principal events therefore follow:
Fajr = D - H(-15 degrees)/15
Sunrise = D - H(-0.833 degrees)/15
Dhuhr = D
Maghrib = D + H(-0.833 degrees)/15
Isha = D + H(-15 degrees)/15
The morning events occur before transit, while the corresponding evening events occur after it.
Fajr and Isha
Fajr begins during morning twilight when the geometric center of the Sun is 15 degrees below the eastern horizon. Isha begins when it reaches 15 degrees below the western horizon.
This is an angular definition, not a fixed number of minutes before sunrise or after sunset. The Sun meets the horizon at different angles during different seasons. Consequently, the Fajr-to-sunrise and Maghrib-to-Isha intervals naturally become longer or shorter over the year.
Sunrise and Maghrib
Sunrise and sunset use an apparent solar altitude of approximately -0.833 degrees, rather than exactly zero.
The correction is approximately:
- 16 arcminutes for the Sun's visible semidiameter.
- 34 arcminutes for ordinary atmospheric refraction near the horizon.
Together they equal approximately 50 arcminutes, or 0.833 degrees. Thus, the Sun's upper edge can appear at the visible horizon while its geometric center remains slightly below it.
Maghrib begins at this calculated sunset.
Hanafi Asr
The Hanafi Asr rule must account for the shadow an object already casts at solar noon. It does not mean that the total shadow is simply twice the object's height.
Let:
Lbe the object's height.S0be its existing shadow at solar noon.Sbe its total shadow at Asr.
Hanafi Asr begins when the additional shadow equals twice the object's height:
S = S0 + 2L
The noon-shadow ratio follows from the difference between latitude and solar declination:
S0/L = tan|phi - delta|
The required solar altitude for Hanafi Asr is therefore:
h_asr = arctan[
1 / (2 + tan|phi - delta|)
]
The calculator then finds when the descending afternoon Sun reaches this altitude:
Asr = D + H(h_asr)/15
Because solar declination changes through the year, the Asr altitude and its clock time also change from day to day.
From astronomy to the displayed time
For each requested date, the calculator:
- Reads the latitude, longitude, and
America/Chicagotime zone. - Converts the date to astronomical time.
- Calculates solar declination, the equation of time, and corrected solar transit.
- Solves the solar altitude equation for Fajr, sunrise, Maghrib, and Isha.
- Solves the Hanafi shadow equation for Asr.
- Converts each astronomical instant into Central Standard or Daylight Time.
- Rounds the final instants to the nearest minute.
No daily times need to be stored in advance. Moving to another date causes the solar position to be calculated again.
Independent validation
The timetable-matching profile was checked against 140 published date rows from five Prayer Center schedules in 2026. Each date supplied Fajr, sunrise, Dhuhr, Asr, Maghrib, and Isha:
140 dates x 6 events = 840 published time cells
840 / 840 matched to the published minute
This does not prove which proprietary program originally generated the PDFs, but it establishes an independently implemented calculation that is observationally equivalent at the timetable's minute resolution.
What the calculation does not determine
These results establish the beginning of the prayer windows. They do not determine:
- The masjid's adhan time if it is intentionally delayed.
- Congregational iqamah times.
- Jumu'ah khutbah or prayer times.
- Operational schedule changes announced by the masjid.
Those congregation times must still be obtained from the Prayer Center.
Atmospheric refraction also varies slightly with temperature, pressure, elevation, and the local horizon. Published calendars use a conventional standard atmosphere so that their results remain stable and reproducible.
Implementation
The calculator uses the open-source Adhan solar ephemeris locally in the browser. It does not make requests to IslamicFinder or another prayer-time API.
The interactive calculator is available at Orland Park Prayer Times.
Technical details and durable verification fixtures are maintained with the source code so future changes can be checked against the same 840 published values.
