Sun Position & Shadow Length Simulator

Compute the sun’s elevation and azimuth (NOAA algorithm) for any latitude, longitude, date and time, plus the length and direction of the shadow cast by an object of a given height, with sunrise/sunset and a full-day shadow curve

Enter latitude, longitude, a date/time and the height of an object (a pole, a building, a tree), and the tool computes:

  • Sun elevation (altitude above the horizon) and azimuth (compass bearing, 0=N, 90=E) using the NOAA/Spencer solar position algorithm.
  • Shadow length on the ground = object height ÷ tan(elevation), shown both in absolute units and as a multiple of the object height.
  • Shadow direction (the antipode of the sun azimuth — where the shadow tip falls from the object's base).
  • Sunrise / solar noon / sunset in local standard time, including polar-night / midnight-sun detection.
  • A full-day curve of elevation and shadow length, with the selected moment marked, and a top-down shadow plan showing the object, sun ray, and cast shadow.

Algorithm details:

  • Solar declination via Spencer's series; equation of time via the NOAA 3-term approximation.
  • Apparent elevation includes NOAA's piecewise atmospheric-refraction correction (accurate near the horizon).
  • You can choose UTC (input time treated as UTC), or local solar time (time-of-day at the longitude, ignoring time-zone and DST — handy for a "where is the sun at 10am solar time" answer).

Accuracy is ~±0.5° in elevation/azimuth for years 1950–2050 — ideal for solar panel siting, architectural shadow studies, gardening, photography planning, or film/game level design.

Example Results

1 examples

Summer-solstice noon shadow in New York

1.8 m person at 40.71°N, 74.01°W at local solar noon on the 2026 June solstice — expect a short shadow of about 0.56 m pointing almost due north.

Elevation ≈ 72.7°, azimuth ≈ 180.0°, shadow ≈ 0.56 m toward true north; sunrise ≈ 04:27 and sunset ≈ 19:32.
View input parameters
{ "lat": 40.7128, "lon": -74.006, "date": "2026-06-21", "hour": 12, "height": 1.8, "tz": 0, "timeBasis": "solar" }

Key Facts

Category
Geography & Science
Input Types
number, date, select
Output Type
html
Sample Coverage
4
API Ready
Yes

Overview

The Sun Position & Shadow Length Simulator computes the sun's precise elevation and azimuth using the NOAA solar position algorithm for any latitude, longitude, date, and time. It also simulates the exact length and direction of a shadow cast by an object of a specified height, providing sunrise, sunset, solar noon times, and a full-day shadow curve.

When to Use

  • Planning solar panel installations to determine optimal tilt angles and avoid shading from nearby structures.
  • Designing architectural layouts or landscaping projects that require detailed seasonal shadow analysis.
  • Scheduling outdoor photography or film shoots to capture specific lighting angles and shadow lengths.

How It Works

  • Input the geographic coordinates (latitude and longitude), date, time, and the height of the object casting the shadow.
  • Select the time basis, choosing either UTC with a timezone offset or local solar time to ignore daylight saving adjustments.
  • The simulator applies the NOAA/Spencer solar position algorithm, incorporating atmospheric refraction corrections, to calculate the sun's elevation and azimuth.
  • It outputs the shadow length and direction, alongside sunrise, solar noon, sunset times, and a visual full-day shadow curve.

Use Cases

Determining the height limits of new fences or buildings to prevent blocking sunlight to neighboring gardens.
Calculating the exact time of day when a specific landmark will cast a shadow over a target area.
Optimizing agricultural crop placement based on daily and seasonal shade patterns from surrounding trees.

Examples

1. Summer Solstice Shadow Analysis in New York

Landscape Architect
Background
A landscape architect needs to know the minimum shadow cast by a 1.8-meter decorative pillar in a New York park during the summer solstice.
Problem
Determine the shortest shadow length and its direction at solar noon to ensure it does not block a nearby walkway.
How to Use
Set latitude to 40.7128, longitude to -74.006, date to 2026-06-21, hour to 12, object height to 1.8, and time zone basis to local solar time.
Example Config
Latitude: 40.7128, Longitude: -74.006, Date: 2026-06-21, Hour: 12, Height: 1.8, Time Basis: solar
Outcome
The simulator calculates a sun elevation of approximately 72.6° and a shadow length of 0.57 meters pointing directly north.

2. Winter Shadow Projection for a London Building

Urban Planner
Background
An urban planner is evaluating the shadow impact of a proposed 10-meter building in London during the winter solstice.
Problem
Calculate the maximum shadow length at 3:00 PM (15:00) UTC to assess light blockage on adjacent properties.
How to Use
Input latitude 51.5074, longitude -0.1278, date 2026-12-21, hour 15, object height 10, timezone offset 0, and time basis UTC.
Example Config
Latitude: 51.5074, Longitude: -0.1278, Date: 2026-12-21, Hour: 15, Height: 10, TZ: 0, Time Basis: utc
Outcome
The tool determines the low sun elevation angle, showing a long shadow extending far to the northeast, along with the full-day shadow curve.

Try with Samples

astronomy

Related Hubs

FAQ

How accurate is the solar position calculation?

The simulator uses the NOAA/Spencer algorithm, which provides an accuracy of approximately ±0.5° for the years 1950 to 2050.

What is the difference between UTC and local solar time?

UTC uses standard clock time adjusted by your timezone offset, while local solar time calculates the sun's position based strictly on your longitude, ignoring time zones and daylight saving time.

How is the shadow direction determined?

The shadow direction is calculated as the antipode (opposite angle) of the sun's azimuth, indicating where the shadow tip falls relative to the object's base.

Does the simulator account for atmospheric refraction?

Yes, it includes NOAA's piecewise atmospheric-refraction correction, which ensures high accuracy even when the sun is near the horizon.

Can this tool detect polar nights or midnight sun?

Yes, the algorithm automatically detects and displays polar night and midnight sun conditions based on the input latitude and date.

API Documentation

Request Endpoint

POST /en/api/tools/sun-position-shadow-simulator

Request Parameters

Parameter Name Type Required Description
lat number Yes -
lon number Yes -
date date Yes -
hour number No -
height number Yes -
tz number No -
timeBasis select No -

Response Format

{
  "result": "
Processed HTML content
", "error": "Error message (optional)", "message": "Notification message (optional)", "metadata": { "key": "value" } }
HTML: HTML

AI MCP Documentation

Add this tool to your MCP server configuration:

{
  "mcpServers": {
    "elysiatools-sun-position-shadow-simulator": {
      "name": "sun-position-shadow-simulator",
      "description": "Compute the sun’s elevation and azimuth (NOAA algorithm) for any latitude, longitude, date and time, plus the length and direction of the shadow cast by an object of a given height, with sunrise/sunset and a full-day shadow curve",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=sun-position-shadow-simulator",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

You can chain multiple tools, e.g.: `https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`, max 20 tools.

If you encounter any issues, please contact us at [email protected]