Explore all 80 calculators
100% Free & Open Access

Sun Exposure Calculator

Determine true direct sunlight hours and 3D shade patterns for your garden plot. Evaluates astronomical solar declination, apparent horizon refraction (-0.833°), building/tree/fence obstruction geometry, and recommends optimal planting cells based on plant-specific light requirements.

Method reviewed by Plant Calculator Team·Updated August 2026

1. Geographic location & date

Enter coordinates or click detect for automatic location.

°
°

2. Garden bed setup & orientation

ft

Orientation rotates the whole grid; cell size sets the spacing used to re-resolve each obstruction's angle and distance from every individual cell.


3. Surrounding 3D obstructions (Buildings, Trees, Fences)

Add any structures or trees surrounding your garden plot.

Structure Type Direction / Bearing Distance Height Width Action

4. Target plant species

Select from presets or add any custom plant in the world.

Set your garden location and obstructions above, then click "Calculate Solar & Garden Exposure" to view solar paths and plant recommendations.

How this is worked out

Solar Noon = 720 - 4×Longitude - EoT + 60×TZ_Offset · Direct Sunlight = Σ(Sun_Elevation > 0° AND Unobstructed_Minutes)

Apparent sunrise and sunset use the standard astronomical solar disk center elevation of -0.833° (accounting for atmospheric refraction -0.566° and solar radius -0.266°). Obstruction elevation angle θ = arctan(H / D) and angular width W_ang = 2×arctan((W/2)/D) determine exact minute-by-minute shading.

Assumptions

  • Direct sunlight requires an unobstructed line-of-sight to the Sun with solar elevation > 0°.
  • Obstruction shade is computed with 3D trigonometry (height, distance, bearing, width) and re-resolved separately for every garden cell from that cell's own position in the bed.
  • The garden is modelled as a uniform grid of square cells (Cell Size, in feet) rotated by the Garden Orientation; obstruction bearing and distance are measured from the garden centre.
  • Sunlight categories: Full Sun (≥6h), Partial Sun (4-6h), Partial Shade (2-4h), Full Shade (<2h).
  • Optimal plant placement minimizes absolute deviation from the plant’s ideal light requirement (shade-loving plants prefer 2-4h, not maximum sunlight).

Understanding garden sunlight: solar paths, DLI & shadow math

Sunlight is the fundamental engine driving photosynthesis, sugar production, flower induction, and fruit ripening. However, determining true solar exposure involves more than counting daylight hours from sunrise to sunset. You must account for the sun's shifting elevation angle throughout the seasons, Daily Light Integral (DLI), and shadow projections cast by nearby fences, roofs, and trees.

Crop Light Requirements & DLI Reference

Horticultural crops are classified by the minimum hours of direct, unfiltered solar radiation they require daily:

Crop Sunlight Categories and Minimum Daily Requirements
Sunlight Category Direct Sun (Hours) DLI (mol/m²/day) Representative Crops
Full Sun (Fruiting Crops)6 to 8+ hours22–35+Tomatoes, Peppers, Corn, Melons, Cucumbers, Squash, Strawberries
Partial Sun (Root Crops)4 to 6 hours14–22Carrots, Beets, Radishes, Turnips, Potatoes, Bush Beans
Partial Shade (Leafy Greens)3 to 4 hours8–14Lettuce, Spinach, Swiss Chard, Kale, Arugula, Asian Greens, Mint
Full Shade (Ornamentals)< 2 hours (Filtered)< 6Hostas, Ferns, Astilbe, Coral Bells (Heuchera), Bleeding Heart

Morning Sun vs. Afternoon Sun: Thermal Quality

Gentle Morning Sun (East Exposure)
East-facing beds receive high photosynthetic light when air temperatures are cool. Dew dries rapidly off leaves—preventing foliar fungal diseases like powdery mildew—without subjecting foliage to scorching heat stress. Ideal for cool-season greens, herbs, and delicate berries.
Intense Afternoon Sun (West Exposure)
West-facing beds receive peak solar irradiance combined with the highest ambient air temperatures of the day (2:00 PM to 6:00 PM). Excellent for heat-loving peppers, eggplant, and melons, but causes cool-season lettuce and spinach to bolt (flower prematurely and turn bitter).

Shadow Trigonometry: Calculating Seasonal Reach

The horizontal shadow cast by an obstruction (such as a 6-foot privacy fence or 20-foot two-story roofline) is determined by its height divided by the tangent of the sun's elevation angle: Shadow Length = Height ÷ tan(Elevation Angle).

  • Summer Solstice (June 21 — High Sun ~70° Elevation): A 6-foot privacy fence casts only a 2.2-foot shadow at solar noon.
  • Spring/Fall Equinox (March/Sept — Mid Sun ~45° Elevation): The same 6-foot fence casts a 6.0-foot shadow at solar noon.
  • Winter Solstice (Dec 21 — Low Sun ~25° Elevation): That 6-foot fence casts an enormous 12.9-foot shadow across winter cold frames and garlic beds.

Three Worked Examples

1. Siting a Heirloom Tomato Patch next to a 6-Foot Wooden Fence

If the fence sits to the south of your proposed bed at 40°N latitude, the bed will remain in shadow during spring until mid-morning. Place the tomato bed at least 6 to 8 feet north of the fence line to guarantee 8+ hours of uninterrupted midday sun from May through September.

2. Planning a Cut Flower Bed Under a Deciduous Oak Tree

In early spring (March–April), bare oak branches allow 6+ hours of filtered sun (ideal for spring bulbs and pansies). By June, full leaf canopy drops light to under 2.5 hours of dappled shade. Transition the bed to shade-tolerant impatiens, coleus, and astilbe for summer.

3. Urban Balcony (East-Facing) Salad Garden

Receives direct sunlight from 7:00 AM to 11:30 AM (4.5 hours of morning sun). Ideal for high-yielding butterhead lettuce, arugula, cilantro, and radishes, while avoiding the bitter heat-bolting of west-facing balconies.

Common Sun Exposure Mistakes

  • Assessing sunlight in winter for a summer garden: The sun's arc is much lower and shorter in winter. A spot shaded in January may receive 10 hours of blazing overhead sun in July.
  • Planting tall pole beans south of low peppers: Placing tall vining trellises or sweet corn on the south side of a garden bed casts a long shadow over dwarf plants behind them. Always position tall crops on the north boundary.
  • Overestimating dappled tree shade: Light passing through a dense leafy tree canopy delivers less than 20% of the usable photosynthetic photons of direct open sky.

Plan crop spacing and growing timelines with our Square Foot Planner, Planting Calendar, and Grow Light Calculator.

Common questions

How does daylight duration differ from direct sunlight hours?

Daylight duration measures the total time the Sun is above the horizon. Direct sunlight hours measure the actual time your specific garden location receives unshaded, direct solar rays after accounting for surrounding buildings, trees, and fences.

Why does the calculator not always recommend the sunniest spot in the garden?

Different plant species have distinct light requirements. Shade-loving plants like Hostas or Ferns suffer heat stress and leaf scorch in 8+ hours of direct sun. The recommendation engine ranks cells based on how closely they match the plant’s preferred light range (e.g. 2-4 hours).

How are 3D obstruction shadows calculated?

For every 5-minute interval throughout the day, the engine computes the Sun’s exact elevation and azimuth angles. If the Sun falls within an obstruction’s angular width and elevation angle θ = arctan(Height / Distance), that interval is flagged as shaded.

How does the calculator handle extreme polar latitudes?

At polar latitudes (e.g., above 66.5°N/S), the engine detects when the solar hour angle equation has no real roots and correctly identifies Polar Day (24-hour Midnight Sun) or Polar Night (0 hours daylight) without division-by-zero errors.

Method reviewed by

Plant Calculator Team

Editorial Team

The Plant Calculator team is a group of gardening enthusiasts, horticulturists, and landscaping professionals dedicated to helping you grow your best garden.

  • Gardening
  • Landscaping
  • Plant Care