# Sunrise and sunset calculator

> Sunrise and sunset times for any place and date, with solar noon, day length and civil twilight, worked out with NOAA's solar calculator method.

Phiên bản tương tác: https://www.calcopenly.com/vi/datetime/sunrise-sunset-calculator
Chủ đề: Máy tính ngày và giờ

The calculator follows NOAA's Solar Calculator, which uses Jean Meeus's formulas for the sun's declination and the equation of time on the chosen date. It then solves for the hour angle at which the centre of the sun is 90.833° from the zenith: the extra 0.833° allows 34′ for atmospheric refraction and 16′ for the sun's radius, so sunrise is the moment the top of the disc meets a flat horizon. Civil dawn and dusk use 96°, the sun's centre 6° below the horizon.

Photographers, walkers, sailors and anyone planning around daylight use it. In London on the June solstice 2026 the sun rises at 04:43 and sets at 21:22 BST, 16 h 38 min of daylight; on the December solstice the day lasts 7 h 50 min.

Times assume sea level and a clear, flat horizon. For the London, Singapore and Delhi examples below they match the US Naval Observatory's figures to the minute.

## Dữ liệu đầu vào

- **Latitude**: Decimal degrees; south is negative.
- **Longitude**: Decimal degrees; west is negative.
- **Date**
- **Show times in** (lựa chọn: Time zone, UTC offset)
- **Time zone** (lựa chọn: This device's time zone, UTC, Honolulu, Anchorage, Los Angeles, Denver, Phoenix, Chicago, Mexico City, New York, Toronto, Bogotá, Halifax, St John's, Santiago, São Paulo, Buenos Aires, Reykjavík, London, Dublin, Lisbon, Lagos, Casablanca, Paris, Berlin, Madrid, Rome, Amsterdam, Stockholm, Oslo, Johannesburg, Cairo, Athens, Helsinki, Kyiv, Istanbul, Nairobi, Moscow, Riyadh, Tehran, Dubai, Karachi, India (Kolkata), Kathmandu, Dhaka, Bangkok, Jakarta, Singapore, China (Shanghai), Hong Kong, Manila, Perth, Seoul, Tokyo, Adelaide, Brisbane, Sydney, Auckland, Chatham Islands, Kiritimati)
- **UTC offset**: 5.5 for UTC+05:30, −3.5 for UTC−03:30.

## Kết quả

- Sunrise – sunset — kết quả chính
- Sunrise
- Sunset
- Solar noon
- Day length
- Civil dawn (sun 6° below horizon)
- Civil dusk
- Daylight
- Sun's declination (°)
- Equation of time (min)
- UTC offset used

## Công thức

$$
\cos H = \frac{\cos 90.833^\circ}{\cos\varphi\cos\delta} - \tan\varphi\tan\delta,\qquad t_{\text{rise/set}} = 720 - 4(\lambda \pm H) - E\ \text{min (UTC)}
$$

## Ví dụ có lời giải

### London on the June solstice

- Latitude: 51.5074 ° N
- Longitude: -0.1278 ° E
- Date: 2026-06-21
- Show times in: Time zone
- Time zone: London
- **Sunrise – sunset: 04:43 – 21:22**
- **Sunrise: 04:43**
- **Sunset: 21:22**
- **Solar noon: 13:02**
- **Civil dawn (sun 6° below horizon): 03:55**
- **Civil dusk: 22:09**
- **Day length: 16 h 38 min 30 s**
- Nguồn đối chiếu: NOAA Solar Calculator main.js run in Node: rise 04:43:05, set 21:21:35, day 998.49 min; civil twilight from the same code at 96°; USNO API: rise 04:43, set 21:22, transit 13:02, civil twilight 03:55–22:09

### Singapore at the March equinox, fixed offset

- Latitude: 1.3521 ° N
- Longitude: 103.8198 ° E
- Date: 2026-03-20
- Show times in: UTC offset
- UTC offset: 8 hours
- **Sunrise: 07:09**
- **Sunset: 19:15**
- **Solar noon: 13:12**
- **Civil dawn (sun 6° below horizon): 06:48**
- **Civil dusk: 19:36**
- Nguồn đối chiếu: NOAA Solar Calculator main.js: rise 07:09:00, set 19:15:29; USNO API: rise 07:09, set 19:15, transit 13:12, civil twilight 06:48–19:36

### Midnight sun in Tromsø

- Latitude: 69.6492 ° N
- Longitude: 18.9553 ° E
- Date: 2026-06-21
- Show times in: Time zone
- Time zone: Oslo
- **Daylight: Midnight sun**
- **Day length: 1 d**
- **Sunrise – sunset: Sun up all day**
- Nguồn đối chiếu: NOAA main.js finds no sunrise or sunset on this date; USNO API: “Object continuously above the horizon”

### Polar night in Tromsø, with civil twilight

- Latitude: 69.6492 ° N
- Longitude: 18.9553 ° E
- Date: 2026-12-21
- Show times in: Time zone
- Time zone: Oslo
- **Daylight: Polar night**
- **Day length: 0 s**
- **Civil dawn (sun 6° below horizon): 09:31**
- **Civil dusk: 13:53**
- Nguồn đối chiếu: USNO API: “Object continuously below the horizon”, civil twilight 09:31–13:53 (UTC+1); NOAA main.js at 96° gives 09:31:13 and 13:53:13

### Delhi in January

- Latitude: 28.6139 ° N
- Longitude: 77.209 ° E
- Date: 2026-01-15
- Show times in: Time zone
- Time zone: India (Kolkata)
- **Sunrise: 07:15**
- **Sunset: 17:46**
- **Civil dawn (sun 6° below horizon): 06:50**
- **Civil dusk: 18:12**
- Nguồn đối chiếu: NOAA Solar Calculator main.js: rise 07:14:59, set 17:46:12 (civil twilight at 96°: 06:49:33, 18:11:39); USNO API: 07:15, 17:46, civil twilight 06:50–18:12

## Câu hỏi

### Why is the day longer than 12 hours at the equinox?

Because sunrise and sunset are timed at the top edge of the sun, and refraction lifts the sun's image by about 34′ near the horizon. Together they add several minutes of daylight at both ends. On 20 March 2026 the day lasts 12 h 6 min in Singapore and 12 h 10 min in London. In London, day and night are closest to equal on 17 March, three days before the equinox.

### What is the difference between civil, nautical and astronomical twilight?

They are defined by how far the sun's centre is below the horizon: civil twilight ends at 6°, nautical at 12° and astronomical at 18°. In London on 21 June 2026 civil dusk comes at 22:09, 47 minutes after sunset. Around midsummer the sun gets no lower than about 15° below London's horizon, so astronomical twilight lasts all night.

### What is solar noon, and why isn't it at 12:00?

Solar noon is the moment the sun crosses the meridian and stands highest in the sky. Clock time differs from it for three reasons: your longitude within the time zone, daylight saving time, and the equation of time, which varies from about −14 minutes in February to about +16 minutes in early November. In London in June solar noon is at about 13:02 BST.

### Where do the midnight sun and polar night happen?

North of the Arctic Circle, at about 66.6° N, and south of the Antarctic Circle. In Tromsø, at 69.6° N, the sun stays above the horizon for weeks around the June solstice and does not rise from late November to mid-January. Even on 21 December, civil twilight there lasts from 09:31 to 13:53, so the polar night is not completely dark.

### “Sunrise and sunset calculator” chính xác đến mức nào?

Độ chính xác phụ thuộc vào dữ liệu nhập và giả định của phương pháp. Phép tính thập phân dùng 50 chữ số có nghĩa, nhưng ước lượng, phương pháp số và dữ liệu nguồn có thể kém chính xác hơn; làm tròn khi hiển thị không loại bỏ các giới hạn đó. Ví dụ có lời giải đã đối chiếu với nguồn độc lập: 5. Ví dụ, “London on the June solstice” được kiểm tra bằng NOAA Solar Calculator main.js run in Node: rise 04:43:05, set 21:21:35, day 998.49 min; civil twilight from the same code at 96°; USNO API: rise 04:43, set 21:22, transit 13:02, civil twilight 03:55–22:09.

### Phương pháp này lấy từ đâu?

NOAA Global Monitoring Laboratory — Solar Calculator (and its main.js / spreadsheet); NOAA — Solar Calculation Details; J. Meeus, Astronomical Algorithms, 2nd ed. (1998), ch. 25 and 28; US Naval Observatory — Sun and Moon rise/set data (cross-check).

## Nguồn

- [NOAA Global Monitoring Laboratory — Solar Calculator (and its main.js / spreadsheet)](https://gml.noaa.gov/grad/solcalc/)
- [NOAA — Solar Calculation Details](https://gml.noaa.gov/grad/solcalc/calcdetails.html)
- J. Meeus, Astronomical Algorithms, 2nd ed. (1998), ch. 25 and 28
- [US Naval Observatory — Sun and Moon rise/set data (cross-check)](https://aa.usno.navy.mil/data/RS_OneDay)
