Need precise sun angle data for a specific date and location? Our sun angle calculator provides hour-by-hour solar altitude and azimuth angles, plus shadow length calculations for any object height. Also, find an interactive visual mode that shows the sun's complete path across the sky and some detailed angle calculations.
Features of the sun angle calculator
The sun angle calculator only requires a location and a date/time entry to start (which you can autofill, if you like!), but it has a few customization options:
- Hour-by-hour data: Complete 24-hour solar position table for any date. You can switch between 12h (AM/PM) and 24h time with the selector.
- Visual solar analysis: Click Visual to see the sun's complete daily journey as an interactive arc diagram with real-time sun positioning (when viewing today's date), compass grid, and elevation markers.
- Shadow calculations: Enter an object's height and the tool will return shadow lengths throughout the day. You can switch between feet & inches and meters with the dropdown. (For more detail, see the shadow length calculator)
- Location search: Find cities worldwide, or enter latitude and longitude coordinates directly in the field. You can also use device location by hitting the GPS button.
- Seasonal presets: Quickly hop to solstices and equinoxes
- Date picker: Any date from past to future - perfect for seasonal comparisons
- Export ready: Hit the Export CSV button to download the data as a CSV to load into another program. Or, hey, to stare at a CSV - your call.
When you change the Location field, hit the Go button (or hit enter or return) to recompute.
Understanding the data
For the header in Table mode, you can hover (tap on mobile) for a tooltip explaining the field or calculations. Here's a glossary of what you'll see:
- Altitude is the sun's angle above the horizon (0° = horizon, 90° = directly overhead).
- Azimuth shows compass direction (0° = North, 180° = South). Shadow length uses the simple formula: object height ÷ tan(altitude angle).
- Shadow Length is the length of the shadow cast by the object you enter in the Height field.
- Phase indicators show you visual sunrise/sunset/twilight classifications with emojis, per hour in the day.
- Air Mass Factor indicates how much atmosphere sunlight travels through (lower numbers mean more direct light).

In Visual mode, the sun's current position appears as a colored dot: yellow for day, blue for twilight, gray for night. The diagram includes subtle grid lines for elevation angles and compass directions to help you understand exactly where the sun sits in the sky.

Methodology and glossary
The Visual mode displays four key solar metrics in output cards:
- Current Elevation - The sun's angle above the horizon in degrees (0° for the horizon up to 90° for directly overhead)
- Zenith Angle - The angle from directly overhead to the sun's position (90° minus elevation)
- Solar Noon Elevation - The maximum elevation the sun reaches on the selected date
- Air Mass Factor - How much atmosphere sunlight travels through using the 1/cos(zenith angle) approximation (1.0 = sun directly overhead, higher numbers = more atmospheric filtering)
City data comes from the cities.json database, covering over 150,000 locations worldwide with latitudes and longitudes. The calculations use the SunCalc library for your location. Please verify all calculations manually, especially for critical applications.
... also, have fun with it! Stay sunny.
Related tools
- Sunrise Sunset Calculator - Precise dawn/dusk times
- Sun Path Diagram - Visual sun trajectory charts
- Solar Panel Angle Calculator - Optimize panel positioning
- Golden Hour Calculator - Perfect photography lighting times
- Blue Hour Calculator - Twilight photography planning
- Daylight Hours Graph - Seasonal daylight patterns
- Moon Phase Calculator - Lunar cycle tracking
- Shadow Length Calculator - Precise shadow length and heading over a day