How to use the sunrise sunset calculator
Prepare the values for this calculation
Approximate sunrise and sunset clock times from date, latitude, longitude, and UTC offset. Use the formula below to check that it answers your question. Read the input units before transferring figures from a statement, measurement or dataset.
Enter and check each input
- Date: choose a real calendar date. The input uses year, month and day; confirm the date rather than entering an elapsed duration.
- Latitude (°): enter a value at least -89.9 and no more than 89.9. Use the unit named in the label or selected above. Do not leave this required field blank.
- Longitude (°): enter a value at least -180 and no more than 180. Use the unit named in the label or selected above. Do not leave this required field blank.
- UTC offset (hours): enter a value at least -14 and no more than 14. Use the unit named in the label or selected above. Do not leave this required field blank.
The input table gives a complete example. Keep units and time periods consistent across related fields.
Calculate and resolve any input error
Choose Calculate after entering the values. Changes also update the answer after a short pause. If an error appears, follow its message, correct the field and calculate again. Reset restores the example values.
Interpret the answer
Check Approximate sunrise first. With the unchanged example inputs, it is 05:31. Compare the additional metrics with the primary result; each has its own label and unit.
Compare and keep a useful result
For a controlled comparison, keep every other example input unchanged and change Latitude (°) from 40 to 44. The resulting Approximate sunrise is 05:17. This illustrates the equation’s response to that input, rather than a forecast of real events.
Read the chart’s axis labels and data table. A scenario curve changes one stated input while holding the others fixed; it does not add external observations. Use Download graph to save an available chart as a PNG.
Use Copy result or Download CSV to keep the answer. Share tool shares the page address without placing your input values in the URL. Recheck inputs and assumptions before using the result for a decision.
Sunrise Sunset Calculator formula
Uses approximate solar declination/hour angle and solar-noon longitude correction; atmospheric refraction is not modeled.
Inputs and units
| Input | Format / range | Example |
|---|---|---|
| Date | YYYY-MM-DD | 2026-06-21 |
| Latitude (°) | minimum -89.9; maximum 89.9 | 40 |
| Longitude (°) | minimum -180; maximum 180 | -74 |
| UTC offset (hours) | minimum -14; maximum 14 | -4 |
Worked example
Using the example inputs above, the approximate sunrise is 05:31.
- Approximate sunrise
- 05:31
- Approximate sunset
- 20:21
- Daylight hours
- 14.84
Results and assumptions
Approximation omits equation-of-time and atmospheric-refraction corrections.
Fix an input or unexpected result
Latitude (°) is required. Enter latitude (°) using the format and bounds in the input table. Zero and an empty field are different: use zero only if it is allowed and represents your data.
If your answer differs from the example, choose Reset and compare every field, including selected units and options. Check percentage versus decimal entry and whether values describe the same period. Round only the final displayed answer when reproducing the formula.
If a discrepancy remains, report the calculator issue with the page address, non-sensitive example inputs, actual result, expected result and a reference for your calculation.
