SoupCalc

Sun Altitude Calculator — Solar Elevation by Place and Time

Sun Altitude Calculator

Solar altitude, also called solar elevation, is the angle of the Sun’s centre above or below the ideal astronomical horizon. A positive result places the Sun above that horizon; zero is on it; a negative result places it below. This calculator estimates the angle for a stated location and instant.

Enter latitude from −90° to 90°, longitude from −180° to 180°, local civil date and time, and the location’s UTC offset for that instant. In this calculator, longitude is positive east and negative west. The UTC offset must already account for any daylight-saving rule in effect; the tool does not infer a political time zone from coordinates.

Method

The implementation follows the compact solar equations published by NOAA. It converts the date and local clock time to a fractional year, then estimates solar declination and the equation of time. Longitude and UTC offset shift clock time into true solar time.

From latitude, declination, and solar hour angle, it computes the cosine of the solar zenith angle:

cos(zenith) = sin(latitude) × sin(declination) + cos(latitude) × cos(declination) × cos(hour angle)

The reported relationship is altitude = 90° − zenith angle. Trigonometric calculations are performed in radians and the displayed result is converted back to degrees.

Worked example

For a point near the equator (latitude 0°, longitude 0°) at local noon with UTC offset 0 near the March equinox, the Sun should be close to overhead. Entering March 20, 2026 at 12:00 gives an altitude of roughly 88° with this compact model, not exactly 90°, because equation-of-time and declination terms shift the apparent solar noon and equinox geometry.

Changing only the clock time to midnight produces a strongly negative altitude. That contrast is a useful input check: if noon and midnight appear reversed, inspect the longitude sign, date, local time, and UTC offset.

What the result means

An altitude near 90° means the Sun is high in the sky; a small positive angle means it is near the ideal horizon. A negative geometric altitude means the Sun’s centre is below that horizon. Twilight brightness, direct sunlight on a surface, and observed sunrise are separate questions affected by atmospheric and local conditions.

Solar-panel incidence also depends on the Sun’s azimuth and the panel’s tilt and orientation. Altitude alone cannot predict electrical output. Likewise, a photograph, window, crop, or outdoor workplace may be shaded by terrain, buildings, vegetation, or equipment that this result cannot see.

Accuracy and limitations

This is a compact planning estimate, not a survey, navigation, safety, or bankable solar-engineering calculation. It does not apply atmospheric refraction, elevation above sea level, local horizon profile, weather, or the apparent angular radius of the Sun. Near sunrise and sunset, refraction makes the observed upper limb differ meaningfully from the geometric centre used here.

Civil time rules are another major error source. Confirm the offset on the selected historical or future date rather than entering today’s offset automatically. Coordinates should use decimal degrees and the correct east/west sign. Leap years are handled by the calendar date, while the compact equations remain approximations.

For navigation, legal shading disputes, concentrating solar equipment, or final energy design, use a validated ephemeris or engineering package and qualified professional review.

Sources

Editorial record

Written and formula-checked by the SoupCalc Editorial Team. Equator/equinox noon and midnight cases were tested against expected geometry, and sign and offset conventions were reviewed against NOAA documentation.

Last reviewed: August 10, 2026.