Introduction
The sun moves across the sky in a path that changes with your location, the date, and the time of day. Knowing where the sun is — how high it sits above the horizon and which direction it faces — matters for solar panel setup, building design, photography, gardening, and more. This Sun Angle Calculator lets you find the sun's exact position from any place on Earth at any time you choose.
Enter your location and a date, and the tool will calculate solar elevation, azimuth, zenith angle, solar declination, hour angle, and the equation of time. It also shows sunrise, sunset, solar noon, and daylight hours. You can check the angle of sunlight hitting a tilted surface like a solar panel, look up when the sun will match a target angle, and estimate clear-sky solar irradiance and air mass. A live mode tracks the sun in real time, and the sun path diagram and compass rose update as you adjust inputs.
All results include step-by-step math so you can follow each calculation. Whether you are sizing a solar energy system with our Solar Panel Calculator, planning shade structures, or just curious about the sun's path, this calculator gives you the data you need in seconds.
How to Use Our Sun Angle Calculator
Enter your location, date, and time below to calculate the sun's position in the sky. The calculator returns the solar elevation, azimuth, zenith angle, declination, hour angle, sunrise and sunset times, shadow length, and more.
Preset City: Pick a city from the dropdown list to auto-fill the latitude, longitude, and UTC offset. Choose "Enter Manually" if your location is not listed.
Latitude: Enter how far north or south your location is. Type the value in the Degrees box as a decimal number, or split it across Degrees, Minutes, and Seconds. Use the dropdown to select N for north or S for south. Valid range is 0° to 90°.
Longitude: Enter how far east or west your location is. Type the value in the Degrees box as a decimal number, or split it across Degrees, Minutes, and Seconds. Use the dropdown to select E for east or W for west. Valid range is 0° to 180°.
UTC Offset: Enter the number of hours your time zone is ahead of or behind UTC. For example, New York is −5 and London is 0. If you are unsure about your offset, our Time Zone Calculator can help you find it.
Daylight Saving: Select "Yes (+1h)" if daylight saving time is active at your location. Select "No" if it is not.
GPS Button: Click the GPS button to detect your current location automatically using your device. The latitude, longitude, and UTC offset will fill in for you.
Month, Day, and Year: Choose the month from the dropdown, then type the day and year. You can also drag the date scrubber slider to scroll through the days of the year, or use the − and + buttons to step one day at a time.
Hour, Minute, and Second: Enter the time of day you want to calculate. Use the Format dropdown to switch between 24-hour, AM, and PM formats. You can also drag the time-of-day slider to change the time quickly. The slider background shows night, twilight, and daylight phases in color.
Calculation Mode: Click a tab at the top to switch between six modes. "Sun Position" gives you the full sun position at your chosen time. "Solar Noon" finds the exact clock time when the sun is highest. "Incident Angle" calculates the angle sunlight hits a tilted surface like a solar panel. "Hour Angle" converts clock time to solar hour angle. "Declination" looks up the sun's north-south tilt for any day of the year. "Reverse Lookup" searches for dates and times when the sun matches a target altitude and azimuth.
Surface Tilt and Surface Azimuth (Incident Angle mode): Enter the tilt angle of your surface in degrees from horizontal, and the direction it faces. A surface azimuth of 0° means it faces due south. If you are mounting panels on a roof, our Roof Pitch Calculator can help you convert roof pitch to a tilt angle in degrees.
Standard Meridian (Hour Angle mode): Enter the reference meridian for your time zone in degrees. This is usually 15° multiplied by your UTC offset.
Target Altitude and Azimuth (Reverse Lookup mode): Enter the sun elevation and compass direction you want to find. Choose how many months to search. The calculator will list every date and time that matches.
Object Height (Shadow Length): In Sun Position mode, enter the height of an object and choose a unit to see how long its shadow will be at the selected time. A diagram below shows the shadow direction.
Calculate Button: Click "Calculate" to run the calculation and update all results. You can also click "Try Example" to load a sample setup, "Snap to Now" to use the current date and time, or "Go Live" to update results every second in real time.
Print Snapshot and Print Full Day: Click "Print Snapshot" to print the current results. Click "Print Full Day" to print a table of sun angles for every 15 minutes of the selected day.
What Is a Sun Angle Calculator?
A sun angle calculator finds the exact position of the sun in the sky for any place, date, and time. It tells you two key angles: solar elevation (how high the sun is above the horizon) and solar azimuth (the compass direction the sun is shining from). These two numbers together pinpoint where the sun sits in the sky at any moment. For a deeper look at general angle math, see our Angle Calculator.
Why Sun Angles Matter
The sun does not follow the same path every day. In summer, it climbs high and stays up longer. In winter, it stays low and sets early. The sun's path also changes based on where you are on Earth. A city near the equator sees the sun almost straight overhead, while a city far north or south never sees it that high. Knowing these angles helps people in many fields make better choices.
Solar panels work best when they face the sun directly. If you know the sun's angle, you can tilt your panels to capture the most light and make the most electricity. Even a few degrees of tilt adjustment can boost energy output throughout the year. Use these sun angle results alongside our Solar Calculator to estimate how much energy your system can produce, and check our Electricity Cost Calculator to see how that translates into savings on your power bill.
Architects and builders use sun angles to design windows, overhangs, and shading. A well-placed overhang can block harsh summer sun but let warm winter light inside. This saves energy on cooling and heating — you can quantify potential thermal losses with our Heat Loss Calculator or size climate control equipment with the BTU Calculator.
Photographers and filmmakers plan shoots around the sun's position. The angle of sunlight changes how shadows fall, which affects the look and mood of every shot. Golden hour — when the sun is low — is a favorite because the light is soft and warm.
Key Terms to Know
Solar elevation is the angle between the sun and the horizon. At sunrise and sunset, it is near 0°. When the sun is directly overhead, it is 90°. A negative value means the sun is below the horizon.
Solar azimuth is the compass direction of the sun, measured in degrees from north going clockwise. For example, 90° is east, 180° is south, and 270° is west.
Solar declination is the tilt of Earth relative to the sun. It changes slowly through the year and is the reason we have seasons. It swings between about +23.45° in June and −23.45° in December.
Hour angle tracks how far the sun has moved from solar noon. It is negative in the morning and positive in the afternoon. Each hour equals 15° of movement.
Equation of Time is a small correction that accounts for Earth's tilted axis and its slightly oval orbit. It explains why clock noon and solar noon rarely match up exactly. This difference can be as large as about 16 minutes. You can explore time offsets further with our Time Difference Calculator.
How Sun Position Is Calculated
The math starts with the day of the year and your latitude and longitude. First, the solar declination is found using the day of year. Next, the Equation of Time corrects for orbital quirks. These values combine with your clock time to find the local solar time and the hour angle. Finally, standard trigonometry formulas use the hour angle, declination, and your latitude to solve for the sun's elevation and azimuth.
The same math can also find sunrise, sunset, solar noon, twilight times, and daylight duration for any location on any date. The shadow length calculation uses the elevation angle and object height to form a right triangle, where the shadow is the base and the object is the vertical side. If you need to determine the area of your roof before installing solar panels, our Roof Area Calculator pairs well with the incident angle results from this tool. You can also explore how reducing grid electricity use lowers your environmental impact with our Carbon Footprint Calculator.