Sundial Calculator - Working Digital Sundial with Shadow Visualization

Written by:
PK

Below, find an interactive sundial calculator that shows how a sundial would work throughout the day at your choice of location. Watch the gnomon shadow move based on time, see solar time and clock time differences, and get construction angles for building your own .

Sundial calculator (and real-time visualization)

Using the sundial calculator

The sundial calculator detects your location (with permission), lets you search from 150,000+ cities worldwide, or lets you enter latitude/longitude. Unlike static sundial generators, this tool shows your sundial working in real-time: watch the gnomon shadow sweep across hour lines as time passes.

It's like time travel, but math!

Basic sundial tool features

  • Real-Time Gnomon Shadow: See exactly where a sundial's shadow falls right now
  • Hour Line Positioning: Calculated angles for 6 AM to 6 PM markings on your dial
  • Solar Time Display: Shows solar time (what your sundial reads) vs clock time
  • Gnomon Angle: The exact tilt angle your gnomon needs (the latitude of a location)
  • Animation Controls: Watch a full day's shadow movement in mere seconds

The Visualization mode shows a sundial in action, while Table mode gives you the construction data you need to build it (or to see how a sundial would act at a location).

A sundial estimation for Boston, MA in August of 2025
Live preview of a sundial in Boston, MA for August. (Assuming you avoid building shadows)

Table mode: see sundial details at your location

Switch to Table mode to get the precise angles you need for construction. The table shows hour line angles measured from the noon line (12 o'clock position). Each entry tells you exactly where to mark your dial.

Sundial hour angles in Boston, MA
Sundial hour angles in Boston, MA
  • Hour Line Angles: Degrees from noon for each hour marking
  • Gnomon Height: Optional scaling for desired sundial size, based on the height of the gnomon
  • SVG Export: Download a dial design for a location, date, and time (with shadow plotted)
  • CSV Export: Get sundial angle data in spreadsheet format

The CSV export includes four key columns: Clock Hour (the time), Hours from Noon (negative for AM, positive for PM), Solar Hour Angle (the sun's position), and Line Angle from Noon (where to mark lines if you are building a sundial, or where to find shadows if you aren't). Perfect for both construction and field identification of existing sundials.

A sundial will show solar time, which differs from clock time by up to ±16 minutes throughout the year (the equation of time). The tool shows this difference so you know what to expect. You can see more details in our analemma calculator.

Why sundials work: The math behind the magic

Sundials work because the Earth rotates at a steady 15° per hour. As the sun appears to move across the sky, shadows cast by a properly angled gnomon sweep across hour lines at predictable angles. The key insight: a gnomon must point toward the North Star (true north) and be tilted at your latitude angle.

The hour line angles follow a specific formula based on your latitude and the time offset from noon:

\alpha = \arctan(\sin(\phi) \times \tan(15° \times
  t))

Where:

  • α is the hour line angle from noon
  • φ is your latitude
  • t is hours from solar noon (negative for morning, positive for afternoon)

That's why sundials look different at different latitudes - a sundial built for Miami won't work correctly in Seattle. Geography matters for a sundial!

Sundial calculation sources and accuracy

  • Solar Position: Uses the SunCalc library for sun angles and positions
  • Equation of Time: Accounts for Earth's elliptical orbit and axial tilt affecting solar vs clock time
  • Cities Database: Geographic data from cities.json, sourced from GeoNames Gazetteer

Building time itself

There's something satisfying about a device that tells time using nothing but shadows and geometry. Your sundial connects you to thousands of years of human timekeeping... plus, it'll keep working even when the power goes out.

Unless there are clouds. Then, yeah, you got me.

      

PK

PK started DQYDJ in 2009 to research and discuss finance and investing and help answer financial questions. He's expanded DQYDJ to build visualizations, calculators, and interactive tools.

PK lives in New Hampshire with his wife, kids, and dog.

Don't Quit Your Day Job...

DQYDJ may be compensated by our partners if you make purchases through links. See our disclosures page. As an Amazon Associate we earn from qualifying purchases.
Sign Up For Emails
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram