Home › Calculators › Sun Position Calculator

Sun Position Calculator

Find where the Sun is in the sky for any location, date and time: its altitude above the horizon, its compass direction (azimuth) and how long shadows are. A chart traces the Sun's height through the whole day.

Last updated:

°

North positive, south negative

°

East positive, west negative

Any unit: the shadow uses the same unit

Enter your values to see the result.
Advertisement
Advertisement

How to use the Sun Position Calculator

  1. Enter latitude and longitude in decimal degrees, pick a city preset, or press Use my location.
  2. Choose the date and local time.
  3. Pick the time zone of the place so the clock time matches.
  4. Optionally enter an object height to get its shadow length.
  5. Read the altitude, azimuth and shadow, then check the chart and hourly table.

Sun position formulas

QuantityFormula
Hour angle HH = 15° × (true solar time in hours − 12)
Altitude αsin α = sin φ · sin δ + cos φ · cos δ · cos H
Azimuth A (from north)A = atan2(sin H, cos H · sin φ − tan δ · cos φ) + 180°
Altitude at solar noonαmax = 90° − |φ − δ|
Shadow lengthL = h ÷ tan α

φ is latitude and δ the solar declination. True solar time is clock time corrected for your longitude within the time zone and for the equation of time. The calculator follows the NOAA solar calculator equations, which are accurate to roughly 0.01° in position for dates within a few centuries of today, and adds a standard atmospheric refraction correction.

Shadow length at common sun angles

Sun altitudeShadow ÷ heightShadow of a 1.8 m person
5°11.4320.6 m
10°5.6710.2 m
20°2.754.95 m
30°1.733.12 m
45°1.001.80 m
60°0.581.04 m
75°0.270.48 m

Shadow angles are useful for planning solar panels and gardens, checking whether a building will shade a window, and photography. Panels facing the Sun's noon azimuth and tilted near your latitude collect the most energy over a year.

Frequently asked questions

What are solar altitude and azimuth?

Altitude (or elevation) is the Sun's angle above the horizon: 0° at sunrise or sunset and 90° directly overhead. Azimuth is the compass direction measured clockwise from true north: 90° east, 180° south, 270° west.

How is the sun angle calculated?

From the Sun's declination δ (its latitude on the sky, between about −23.44° and +23.44° through the year), your latitude φ and the hour angle H: sin(altitude) = sin φ sin δ + cos φ cos δ cos H. This calculator uses the NOAA solar position equations, accurate to a fraction of a degree.

How do I calculate shadow length from the sun angle?

Shadow length = object height ÷ tan(altitude). At 45° the shadow equals the height; at 30° it is 1.73 times the height and at 10° about 5.7 times. The shadow points directly away from the Sun, at the azimuth plus 180°.

Why is the sun not due south at 12:00?

Solar noon, when the Sun is highest and due south (or north in the southern hemisphere), depends on your longitude within the time zone, daylight saving time and the equation of time, which shifts it by up to about 16 minutes during the year.

Does the calculator include atmospheric refraction?

Yes. Refraction bends sunlight and lifts the Sun's apparent position, by about 0.57° at the horizon and much less higher up. The main altitude includes it; the steps also show the geometric altitude.

What is the highest the Sun gets at my location?

At solar noon the altitude is 90° − |latitude − declination|. At 40° N it is about 73.4° at the June solstice and 26.6° at the December solstice. The result card shows the maximum for the chosen date.

Is my location sent anywhere?

No. The Use my location button asks your browser for coordinates and all calculations run on your device; nothing is uploaded.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

Golden Hour CalculatorMorning and evening golden hour and blue hour times for any location and date.Sunrise Sunset CalculatorSunrise, sunset, twilight, golden hour and blue hour times for any place and date.Solar Panel CalculatorEstimate solar system size, number of panels and roof area from your monthly kWh and sun hours.Online CompassUse your phone as a compass with heading in degrees and cardinal points.Day and Night World MapLive world map of where it is day or night now, with twilight bands, sun and moon positions.Eclipse CalculatorUpcoming solar and lunar eclipses for your location, with local times, coverage and an animation.Elevation FinderClick a map or search a place to find its elevation in feet and meters, with pins and a profile.Moonrise and Moonset CalculatorMoonrise, moonset, Moon transit and illumination for any place and date, plus a month table.BMI CalculatorCalculate BMI and a healthy weight range.Sleep CalculatorFind the best bedtime or wake-up time using 90-minute sleep cycles.Body Fat CalculatorBody fat % with the US Navy and BMI methods, lean vs fat mass.Ideal Weight CalculatorCompare ideal body weight from the Robinson, Miller, Devine and Hamwi formulas.Weight Loss Percentage CalculatorWork out the percentage of body weight you have lost and track progress to your goal.Waist to Hip Ratio CalculatorWork out your waist-to-hip ratio and WHO health risk category for men and women.Ideal Gas Law CalculatorSolve PV = nRT for pressure, volume, moles or temperature with automatic unit conversion.Lean Body Mass CalculatorEstimate lean body mass, fat mass and body fat % with the Boer, James and Hume formulas.Pregnancy Weight Gain CalculatorSee your recommended pregnancy weight gain by BMI and week, using the IOM 2009 guidelines.Baby Percentile CalculatorWeight, length and head circumference percentiles for babies 0–24 months on WHO growth charts.Life Expectancy CalculatorEstimate remaining life expectancy from age and sex, with rough lifestyle adjustments.Blood Alcohol CalculatorEstimate BAC over time from your drinks with the Widmark formula, with peak and time to sober.A1C CalculatorConvert A1C % to estimated average glucose in mg/dL and mmol/L, and back.FFMI CalculatorFind your fat-free mass index and normalized FFMI from weight, height and body fat.Puppy Weight CalculatorEstimate your puppy's adult weight from its age, current weight and breed size.Growth Rate CalculatorTotal growth, compound growth rate per period, linear average and a projection.Army Body Fat CalculatorArmy tape test body fat (2023 one-site or legacy method) vs AR 600-9 standards by age.Blood Pressure CalculatorBlood pressure reading to AHA category, mean arterial pressure and pulse pressure.Waist to Height Ratio CalculatorWaist to height ratio in cm or inches with health bands and the 0.5 rule waist target.Alcohol Units CalculatorUK alcohol units from volume and ABV, plus a weekly total vs the 14-unit guideline.Barbell Plate CalculatorWhich plates to load on each side of the bar for any target weight, in kg or lb.GFR CalculatorEstimate eGFR from creatinine, age and sex with CKD-EPI 2021 and see the CKD stage.Mean Arterial Pressure CalculatorCalculate mean arterial pressure (MAP) and pulse pressure from a blood pressure reading.Body Shape CalculatorFind your body shape (hourglass, pear, apple, rectangle) from bust, waist and hip sizes.Child BMI CalculatorBMI and CDC BMI-for-age percentile for kids and teens 2–20, with weight category.Horse Weight CalculatorEstimate a horse's weight in kg and lb from heart girth and body length tape measurements.Quit Smoking Savings CalculatorMoney saved, cigarettes not smoked and health milestones since your quit date.Tire Age CalculatorDecode the DOT tire date code to see when a tire was made, its age and when to replace it.Tree Age CalculatorEstimate how old a tree is from its trunk circumference and species growth factor.Yarn Yardage CalculatorEstimate yards or metres of yarn and skeins needed by project, size and yarn weight.Sugar Intake CalculatorYour daily added sugar limit in grams and teaspoons (AHA and WHO), compared with your intake.Swimming Laps CalculatorHow many laps or lengths make a mile or km in a 25 yd, 25 m or 50 m pool, and laps to miles.Weight TrackerLog weigh-ins and see a 7-day average chart, weekly trend and projected goal date.Win Percentage CalculatorTurn a win-loss-tie record into a win percentage and see the wins needed to hit a goal.Biological Age CalculatorEstimate your biological age from sleep, exercise, smoking, diet, BMI and blood pressure.Body Roundness Index CalculatorBRI from waist and height, with risk band chart, estimated body fat and visceral fat signal.Car Seat Stage FinderEnter age, weight and height to see which car seat stage your child needs, per AAP guidance.Child Height Percentile CalculatorFind a child's height-for-age percentile and z-score on the CDC growth chart, ages 2 to 20.Cycling Power CalculatorWatts needed for a speed, or speed from watts, using weight, gradient, CdA, Crr and wind.Diabetes Risk TestQuick type 2 diabetes risk score from age, family history, blood pressure, activity and weight.Ergonomic Desk Height CalculatorIdeal sitting and standing desk, chair, keyboard and monitor height from your height.Eyeglass Prescription ExplainedTurn SPH, CYL, AXIS, ADD and PD into a plain-English explanation of your glasses prescription.Heart Disease Risk CalculatorFramingham 10-year heart disease risk and heart age from cholesterol, BP, smoking and diabetes.Meat Temperature GuideUSDA safe internal temperature, doneness, pull temp, carryover and rest time for any meat.Metabolic Age CalculatorEstimate your metabolic age by comparing your BMR with healthy-weight averages for each age.Passer Rating CalculatorCalculate NFL quarterback passer rating and NCAA passing efficiency from a stat line.Relative Fat Mass CalculatorEstimate body fat % from height, waist and sex with the RFM formula, and compare it with BMI.Running Route Distance CalculatorClick on a map to draw a running, walking or cycling route and get distance, laps and finish time.Skinfold Body Fat CalculatorBody fat % from caliper readings: Jackson-Pollock 3, 4, 7-site and Durnin-Womersley.Strength Standards CalculatorYour lift level (beginner to elite) and bodyweight ratio from lift, body weight, sex and age.
See all 51 Health & Body Calculators →