Calculate solar irradiance (GHI, DNI, DHI, and GTI) for any location and date with accuracy. Our solar irradiance calculator provides estimated W/m² readings, hourly charts, monthly averages, and solar panel optimization tools for solar energy planning.
Using the solar irradiance calculator
Enter a city name, latitude and longitude, or click the GPS button to use your current position. Select a date and hit Calculate to see:
- Instant irradiance values: GHI, DNI, DHI, and Air Mass at solar noon
- Panel performance metrics: GTI calculations with optimal panel tilt suggestions (but next, try our Solar Panel Angle Calculator!)
- Interactive daily curve: Hour-by-hour solar irradiance with hover details

Basic features
- Location search: Find cities worldwide or enter latitude and longitude coordinates directly. GPS location works too
- Daily/Monthly toggle: Switch between detailed hourly analysis and monthly averages with seasonal breakdowns
- Clear vs typical conditions: Toggle between theoretical clear-sky and real-world weather (our simplified model uses ~75% of clear-sky values)
- Live interactive charts: Hover over the daily curve to see time-specific solar irradiance values

Advanced panel settings
Click Show Advanced to customize for your specific solar installation:
- Site elevation: Toggle between meters/feet (auto-detects US users). Higher elevations get around 12.5% more solar irradiance per 1000m
- Panel tilt angle: Auto-suggests optimal tilt (roughly your latitude) with live GTI updates. For seasonal optimization, use our Solar Panel Angle Calculator
- Azimuth direction: Panel orientation (180° = true south for Northern Hemisphere)
- Ground albedo: Light reflection from surfaces (grass ~0.20, snow ~0.80, concrete ~0.30)
- Shading losses: Lets you manually account for trees, buildings, or other obstructions

Monthly averages and export options
Switch to Monthly view for the big picture. See monthly averages, annual totals, seasonal breakdowns, and even how many average US homes your solar potential could power (per m² equivalent, based on 30 kWh/day consumption).
Export options include:
- CSV Data: Hourly irradiance values with location metadata
- JSON Export: Complete dataset with calculation parameters
- SVG Graphics: Daily curves for your viewing pleasure
- Monthly CSV: Annual summary with seasonal comparisons
Metadata included in exports: location, model (clear-sky vs typical), timezone display, elevation, panel tilt and azimuth, ground albedo, and shading fraction.

Understanding solar irradiance measurements
Solar irradiance is measured in several ways, each telling part of the story:
- GHI (Global Horizontal Irradiance) is the total solar power hitting a flat horizontal surface. Think of this as the raw solar resource at your location – what a panel lying 'flat' on the ground would receive.
- DNI (Direct Normal Irradiance) measures the direct beam from the sun – the energy that creates sharp shadows. This is what concentrating solar systems track, and what matters for solar thermal applications.
- DHI (Diffuse Horizontal Irradiance) captures the scattered sunlight from the sky. On clear days, roughly 10–25% of solar energy arrives as diffuse light. (On cloudy days, it can be nearly 100% diffuse.)
- GTI (Global Tilted Irradiance) is what actually hits your tilted solar panels. This combines direct beam, sky diffuse, and ground-reflected light hitting your specific panel orientation. This is the number that matters for actual solar production.
- Daily Energy (kWh/m²/day) integrates the hourly power over 24 hours. Solar installers use this for system sizing – multiply by your panel area and efficiency to estimate daily production.
Air mass and atmospheric effects
Air Mass measures how much atmosphere sunlight travels through to reach you. AM 1.0 means the sun is directly overhead (only possible in the tropics at certain times of year). AM 2.0 means twice the atmospheric path, which filters and weakens the solar beam.
The tool displays Air Mass values to help understand why solar irradiance varies throughout the day. High Air Mass numbers (low sun angles) mean more atmospheric filtering and lower irradiance values.
Practical applications and real-world use
Solar panel planning
Use GTI daily energy totals for system sizing. The fundamental solar production formula is:
\text{Daily Energy (kWh)} = GTI \times \text{Panel Area (m²)} \times \text{Efficiency}
Example: A 5kW solar array with 20% efficiency covering 25m² in Phoenix (6.5 kWh/m²/day GTI):
6.5 \times 25 \times 0.20 = 32.5 \text{ kWh/day}
The "Powers X homes" calculation provides real-world context for energy density (using 30 kWh/day average US household consumption, though actual usage ranges from 15-60+ kWh/day). Remember this is per square meter – multiply by your actual panel area for total system potential. In our tables we label this as per m² equivalent homes for clarity.
Reality check: Real-world solar production typically achieves 75-85% of theoretical calculations due to inverter losses, wiring resistance from gauge, distance, and installation imperfections, soiling, and module degradation. Also note our "typical weather" mode applies a uniform 75% reduction to clear-sky values as a simplified climatological adjustment.
All that to say: your energy may vary.
Methodology and sources
Our calculator implements industry-standard solar radiation models. Here's a summary plus where your can find the math and derivations.
Clear-sky irradiance models
GHI calculation: Haurwitz clear-sky model (1945) from Haurwitz's classic paper "Insolation in relation to cloudiness and cloud density":
GHI = 1098 \times \cos(\theta_z) \times e^{-0.059 / \cos(\theta_z)}
Where θ_z is the solar zenith angle.
DNI calculation: Simplified atmospheric transmittance model with elevation correction:
DNI = ETRN \times e^{-0.14 \times AM} \times \left(1 + \frac{elevation}{8000m}\right)
Where ETRN is the extraterrestrial normal irradiance and AM is air mass.
DHI estimation: Derived as closure from GHI and DNI, ensuring energy conservation across irradiance components:
DHI = \max(0, GHI - DNI \times \cos(\theta_z))
Air mass calculation: Kasten-Young formula (Applied Optics, 1989) with refraction correction:
AM = \frac{1}{\cos(\theta_z) + 0.50572 \times (96.07995 - \theta_z)^{-1.6364}}
Where θ_z is the zenith angle in degrees.
Tilted surface (GTI) calculations
The tool implements the Hay-Davies anisotropic diffuse sky model (1980) combining three irradiance components:
- Direct beam: DNI × cos(incidence angle)
- Anisotropic diffuse: DHI × [(1-Ai) × (1+cos(tilt))/2 + Ai × Rb], where Ai is the anisotropy index (DNI/ETRN) and Rb is the beam tilt ratio
- Ground reflected: albedo × GHI × (1 - cos(tilt))/2
The anisotropic model accounts for circumsolar brightening (the bright area around the sun), providing more accurate results than any simple isotropic diffuse models. Methods based on Hay & Davies (1980) and Solar Engineering of Thermal Processes by Duffie & Beckman.
Technical limitations
There's a lot in this tool, but I didn't account for everything. The implementation prioritized speed and usability with some accuracy trade-offs. Here are the bullet points:
- Monthly calculations - use the 15th of each month as representative with 30-minute sampling
- Timezone handling - the tool uses your device's timezone, not location-specific solar time
- Simplified atmospheric model - lacks seasonal, humidity, and aerosol variations found in research-grade tools. I don't even know if you can call it a "model", really, it's a 25% static reduction, haha.
So, a brief disclaimer: these calculations provide theoretical estimates for planning purposes. Consider this tool a starting point for your research, hopefully simpler than other tools you can find. Actual solar irradiance varies with:
- Local weather patterns and cloud cover
- Atmospheric pollution and aerosols
- Seasonal humidity and precipitable water
- Local topography and horizon obstructions
For site prospecting and educational use, these approximations provide excellent speed-accuracy balance. For final engineering designs, consider validation with tools like NREL PVWatts or PVGIS.
Data sources and libraries
- Sun positioning: SunCalc.js library for precise astronomical calculations
- Location database: Cities.json with worldwide locations including coordinates and time zones
- Air mass calculation: Kasten-Young formula with atmospheric refraction correction
- ISS parameters: ~400km orbital altitude, ~59% sunlight exposure accounting for Earth's shadow.
- Solar constant: 1361 W/m² from NASA SORCE mission measurements. I use Isc≈1367 W/m² for extraterrestrial normal irradiance in clear-sky calculations (per Duffie & Beckman), while the space assumption uses 1361 W/m².
Related solar and astronomy tools
Complete your solar energy analysis with these other DQYDJ calculators:
- Solar Panel Angle Calculator - Find optimal tilt angles for maximum energy
- Sun Angle Calculator - Hour-by-hour sun positions and shadow analysis
- Shadow Length Calculator - Interactive shadow analysis for obstruction planning
- Sun Path Diagram Generator - Visualize annual sun trajectories
- Solar Noon Calculator - Peak irradiance timing and countdown
- Solar Declination Calculator - Seasonal sun angle variations
- Time Lapse Sun Planner - Photography interval calculations
- Daylight Hours Graph - Seasonal daylight patterns
- Sunrise Sunset Calculator - Precise dawn and dusk timing
- Golden Hour Calculator - Perfect photography lighting times
Go forth and harvest photons efficiently! ☀️