# Sun Angle Calculator

URL: https://speedycalculator.com/calculators/physics/sun-angle/
Last updated: 2026-10-30

> The sun angle calculator finds the Sun's elevation (altitude) and azimuth for any location, date and time, plus the solar zenith angle and the length of a shadow, using NOAA's solar position equations.

## Inputs

- Latitude (° N positive)
- Longitude (° E positive)
- Date
- Time zone (UTC offset in hours)
- Local time
- Object height (for shadow) (m, cm, mm, km, in, ft, yd, mi)

## Results

- Equation of time
- Solar declination
- Hour angle
- Solar elevation
- Solar zenith angle
- Solar azimuth (from north, clockwise)
- Shadow length

## Formula

```
Solar longitude λ and obliquity ε give declination δ = asin(sin ε·sin λ) and the equation of time,  hour angle ha = (true solar time)/4 − 180°
cos θ_z = sin φ sin δ + cos φ cos δ cos ha,  elevation = 90° − θ_z,  shadow = height / tan(elevation)
```

## Explanation

The Sun's position decides solar panel output, shadows, room lighting and photography's golden hour. It changes with latitude, season and time of day.

### How to use the Sun Angle Calculator

- **Latitude (° N positive)**
- **Longitude (° E positive)**
- **Date**
- **Time zone (UTC offset in hours)**
- **Local time**
- **Object height (for shadow)**

Results update as you type, every field has its own unit menu, and everything is calculated in your browser.

### How it works

Enter the latitude and longitude, the date, the local clock time and its UTC offset (remember daylight saving time), and an object height for the shadow.

### Inputs explained

FieldWhat to enterLatitude (° N positive)A numberLongitude (° E positive)A numberDateA dateTime zone (UTC offset in hours)A numberLocal timeA clock time (hours and minutes)Object height (for shadow)Units: m, cm, mm, km, in, ft …

### What each result means

- **Equation of time** = 4×(mod([L] - deg(atan2(cos([eps])×sin([lambda]), cos([lambda]))) + 540, 360) - 180)
- **Solar declination** = deg(asin(sin([eps])×sin([lambda])))
- **Hour angle** = [tst]÷4 - 180
- **Solar elevation** = 90 - deg(acos([cz]))
- **Solar zenith angle** = deg(acos([cz]))

### Example values

How the main result changes when **Latitude** changes and everything else stays at the example values above:

Latitude (° N positive)Solar elevation (°)25.7551.86638.6339.04651.5126.20964.3813.36477.260.516

## Worked example

Inputs — Latitude (° N positive): 51.5074; Longitude (° E positive): -0.1278; Date: 2026-10-25; Time zone (UTC offset in hours): 0; Local time: 12:00; Object height (for shadow): 1.8 m.

Results — Equation of time = 15.934 min; Solar declination = -12.1954 °; Hour angle = 3.8557 °; **Solar elevation = 26.209 °**; Solar zenith angle = 63.791 °; Solar azimuth (from north, clockwise) = 184.2 °; Shadow length = 3.6566 m.

## Key terms

- **Solar azimuth**: Compass direction of the Sun.

## FAQ

**Why include the time zone?**
Solar position depends on true solar time, not clock time.

**What is the equation of time?**
The difference between solar time and mean clock time (up to ±16 min).

**How accurate is this?**
About ±0.1° for current dates, ignoring refraction.

**What does a negative elevation mean?**
The Sun is below the horizon.


## Sources

- [NOAA Global Monitoring Laboratory – Solar calculation details](https://gml.noaa.gov/grad/solcalc/calcdetails.html)
- [OpenStax – Astronomy 2e](https://openstax.org/details/books/astronomy-2e)
