The solar declination calculator below shows the sun's declination angle throughout the year for any location worldwide. Calculate daily solar declination values, see seasonal patterns, and export data. Choose between three calculation algorithms and visualize the sun's annual movement with interactive charts and visualizations.
Solar declination calculator
Using the solar declination calculator
The solar declination calculator detects your location, lets you enter a latitude and longitude, or lets you search through a database of cities worldwide. Switch between three different calculation algorithms to see how precision varies, and explore the data through interactive charts, tables, or a globe visualization.
Basic solar declination features
- Daily Declination Values: See the sun's declination angle for a specific date
- Algorithm Selection: Choose between Simple approximation, Spencer's (1971) formula, or Meeus
- Location Search: Type a city name or enter a latitude and longitude
- Seasonal Markers: Automatic highlighting of solstices and equinoxes on the annual chart
- Today Indicator: Current date is prominently marked on all views
The declination values update automatically as you change locations or dates, showing exactly how the sun's position varies throughout the year.
Visualization modes
Click the Chart, Table, or Visual buttons to switch between different ways of exploring solar declination:
Chart View: Interactive annual declination curve with seasonal markers and algorithm comparison. The chart shows the familiar sine wave pattern of solar declination, peaking at summer solstice and reaching its minimum at winter solstice.

Table View: Detailed daily data with declination values, sun overhead latitude information, and easy scrolling through the year

Visual Mode: Interactive 3D globe showing the sun's declination line and your location. Watch the declination line sweep north and south as you play through the year!

Data export and accuracy
- Multiple Export Formats: Download your declination data as CSV, JSON, or download the SVG chart with your choice of algorithm
The different algorithms show interesting variations - typically within a few degrees of each other, but the differences become more apparent at extreme dates and locations.
Algorithm comparison
The calculator offers three different algorithms with varying levels of precision. The differences are typically small (on the order of 0.5°) but become more noticeable at extreme dates:
Simple Approximation uses a basic sinusoidal formula to estimate declination:
\delta = 23.45° \sin\left(\frac{360°(n-81)}{365}\right)
Spencer (1971) Formula provides improved accuracy through a Fourier series as published in Search journal (Volume 2, 1971) and transcribed to the Sundial mailing list in 1998:
\delta = 0.006918 - 0.399912\cos(\Gamma) + 0.070257\sin(\Gamma) - 0.006758\cos(2\Gamma) + 0.000907\sin(2\Gamma) - 0.002697\cos(3\Gamma) + 0.001480\sin(3\Gamma)
And finally, the Meeus Algorithm implements the high-precision astronomical calculations from Jean Meeus's Astronomical Algorithms textbook:
\delta = \arcsin(\sin(\varepsilon) \cdot \sin(L))
Where:
- n: day of year (1-365/366)
- Γ: fractional year in radians, calculated as Γ = 2π(n-1)/365
- ε: Earth's axial tilt (obliquity of the ecliptic)
- L: apparent ecliptic longitude of the sun
What is solar declination?
Solar declination is the angle between the sun's rays and the Earth's equatorial plane. Think of it as how far north or south the sun appears to be in the sky throughout the year.
At the summer solstice (around June 21), the sun reaches its maximum northern declination of approximately +23.44°. At the winter solstice (around December 21), it reaches its maximum southern declination of approximately -23.44°.
This angle directly determines which latitude is receiving direct overhead sun. When declination is +20°, the sun is directly overhead at 20° North latitude (Mexico or Hawaii and other locations at that latitude). When it's -15°, the sun is overhead at 15° South (northern Brazil, southern Africa).
Solar declination calculation sources
- Astronomical Calculations: Solar position algorithms implemented using the SunCalc library for sun positioning
- Location Database: City coordinates from cities.json, sourced from GeoNames Gazetteer
- Interactive Visualizations: Charts and globe rendering powered by D3.js with geographic data from TopoJSON world atlas
- Algorithm Sources: Simple approximation from physics literature, Spencer (1971) formula from Search journal Volume 2 (also transcribed in 1998), and Meeus algorithms from Astronomical Algorithms
Related solar and astronomy tools
Explore more aspects of solar positioning and astronomical calculations:
- Solar Tracker Map - Real-time sun position and a day/night visualization
- Sun Angle Calculator - Hour by hour solar position and shadow lengths
- Sunrise Sunset Calculator - Golden hour, blue hour, and daylight tracker
- Solar Noon Calculator - Find when the sun reaches its peak
- Daylight Hours Graph - Annual daylight variation chart
- Sun Path Diagram Generator - Visualize solar movement by location
- Day Night World Map - Interactive terminator line and global daylight and twilights
- Moon Phase Calculator - Track lunar cycles and moonrise times
- Analemma Calculator - The sun's figure-8 pattern and equation of time
- Blue Hour Calculator - Blue hour times for photography
Understanding solar declination helps explain why seasons exist, why solar panels need different tilt angles throughout the year, and why the sun's path across the sky changes so dramatically between summer and winter.