Skip to main content
DigiCalcs

How to Calculate Sunrise & Sunset Times

What is Sunrise & Sunset Times?

A sunrise/sunset calculator computes the times of sunrise, sunset, solar noon, and day length for any location and date. Times vary with latitude, longitude, and time of year due to Earth's axial tilt and orbital position.

Step-by-Step Guide

  1. 1Solar declination: the angle between the sun and the equatorial plane (varies −23.5° to +23.5°)
  2. 2Hour angle: the sun's position relative to solar noon
  3. 3Sunrise/sunset occur when the sun is at −0.833° (accounting for refraction and sun's radius)
  4. 4Algorithm based on Jean Meeus's "Astronomical Algorithms"

Worked Examples

Input
New York City · 21 June
Result
Sunrise ≈ 5:25 AM · Sunset ≈ 8:31 PM · Day length ≈ 15 h 6 min

Ready to calculate? Try the free Sunrise & Sunset Times Calculator

Try it yourself →

Settings

PrivacyTermsAbout© 2026 DigiCalcs