Sri Lanka Sunrise & Sunset Time Calculator
Find the exact sunrise, sunset, solar noon, day length, twilight and photography golden-hour times for any Sri Lankan city on any date. All in Sri Lanka Standard Time (UTC+5:30), computed with the NOAA solar algorithm, no signup, no ads, no location permission.
How it works
This calculator uses the solar-position method published by the NOAA Global Monitoring Laboratory. It is pure astronomy, the same math NOAA's own online Solar Calculator runs, so every result is deterministic and works offline in your browser. Nothing is sent to a server, and no GPS permission is requested.
The chain of formulas, all in degrees unless noted:
- Convert the calendar date to a Julian day, then to Julian centuries since J2000.0:
T = (JD − 2451545) / 36525. - Compute the sun's geometric mean longitude and mean anomaly, add the equation of centre to get the true and then apparent solar longitude.
- From the obliquity of the ecliptic derive the solar declination δ and the equation of time (EoT), the gap between clock time and true solar time.
- Find solar noon in local clock minutes:
720 − 4·lon − EoT + 60·5.5for Sri Lanka's fixed UTC+5:30. - Solve the hour angle H for the target altitude:
cos H = (cos z − sin φ · sin δ) / (cos φ · cos δ), where φ is latitude and z is the zenith, 90.833° for sunrise and sunset (the −0.833° horizon accounts for refraction and the sun's radius), and 96°, 102° and 108° for civil, nautical and astronomical twilight. - Sunrise = solar noon − 4·H and sunset = solar noon + 4·H (minutes). Day length is the difference. Golden hour (sun between +6° and −6°) and blue hour (−6° to −4°) come from the same hour-angle formula at those altitudes.
If |cos H| > 1 the sun never reaches that altitude, so the tool reports a polar day or polar night instead of an invalid time, never relevant inside Sri Lanka, but correct for custom coordinates far from the equator. Because Sri Lanka lies within about 10° of the equator, the declination swing barely changes the hour angle, which is why sunrise and sunset move so little across the year. Every result is cross-checked against a second, independently written NOAA implementation on this site; the two agree to the second.
Worked examples
Frequently asked questions
Sources & references
- NOAA Global Monitoring Laboratory: Solar Calculation details (canonical algorithm)
- NOAA Solar Calculator: used to reconcile the Colombo worked examples
- Time and Date: independent sunrise/sunset reference for Colombo
Sunrise, sunset and solar-noon values for the worked-example dates were last cross-checked against the NOAA Solar Calculator on 2026-07-02. Sri Lanka Standard Time is a fixed UTC+5:30 with no daylight saving.
Related tools
Comments & feedback
Spotted a bug or want an improvement? Tell us, our team reviews every comment, and good ideas get built. Comments are public and anonymous.
Found a bug, edge case, or want another city added?
Email me at [email protected] , most fixes ship within 24 hours.