Suncalc

Suncalc

Suncalc is an open-source JavaScript library for calculating sun position, sunlight phases (times for sunrise, sunset, dusk, etc.), moon position and lunar phase for a given location and time. It has no dependencies and is very lightweight, making it easy to integrate into web ap
sun moon position phase calculator open-source

Suncalc: Open-Source JavaScript Library

Calculate sun position, sunlight phases, moon position, and lunar phase for a given location and time with this lightweight, dependency-free JavaScript library

What is Suncalc?

Suncalc is an open-source JavaScript library developed by Vladimir Agafonkin for calculating the position of the sun and moon as well as sunlight phases (sunrise, sunset, dusk, etc) based on date, time and geographic location. It is designed to be lightweight, fast and have no dependencies, making Suncalc easy to integrate into web applications.

Some key features of Suncalc include:

  • Calculate sunrise, sunset, dawn, dusk, solar noon, daylight length, moonrise and moonset times
  • Get sun and moon position coordinates (azimuth, altitude)
  • Moon phases and illumination percentage calculations
  • Simple API with timezone and DST support
  • No dependencies, small filesize (9KB gzipped)
  • Works client-side in browser or server-side in Node.js

Suncalc provides an accurate solar position algorithm and has been tested against official data sources. It can account for atmospheric refraction during sunrise and sunset. The moon calculations are based on an accurate ephemeris model. There are no limitations or quotas.

Because of its lightweight footprint and ease of use, Suncalc is popular for integrating solar information into map tools, weather apps, calendars, automated home technology, solar energy projects and other web/mobile applications where sunrise, sunset or moon times are needed.

Suncalc Features

Features

  1. Calculates sun position
  2. Calculates sunlight phases
  3. Calculates moon position
  4. Calculates lunar phase

Pricing

  • Open Source

Pros

Open source

Lightweight

No dependencies

Easy to integrate

Cons

Limited to sun and moon calculations


The Best Suncalc Alternatives

Top Science & Education and Astronomy & Space and other similar apps like Suncalc


SunIZup icon

SunIZup

SunIZup is a user-friendly cloud-based software solution designed specifically for solar installers to streamline the process of designing and selling photovoltaic solar systems for residential and commercial properties. Some key features of SunIZup include:Intuitive site layout tools using aerial imagery to design optimal solar installation plans3D modeling to visualize roof...
SunIZup image
Sol: Sun Clock icon

Sol: Sun Clock

Sol: Sun Clock is a customizable, free open-source software for visualizing the solar and lunar positions in the sky. It provides an interactive on-screen display showing the movements of the sun and moon relative to the local horizon at specified dates/times and geographic locations.Some key features of Sol include:Interactive graphical...
Sol: Sun Clock image
Sun Surveyor icon

Sun Surveyor

Sun Surveyor is an augmented reality software application used for solar site analysis and visualization. It allows users to see how sunlight interacts with a specific location on the Earth's surface. Using the camera on your mobile device, Sun Surveyor overlays a map showing solar access and shading effects based...
Sun Surveyor image
Sun Intervals icon

Sun Intervals

Sun Intervals is an interactive ear training web and mobile application designed specifically for guitarists and musicians looking to develop more precise pitch and better interval recognition. It allows users to customize interval training sessions by selecting specific intervals they want to practice, like minor thirds, tritones, or octaves, and...
Sun Intervals image
SUNSETWX icon

SUNSETWX

SUNSETWX is a comprehensive weather forecasting and meteorological data analysis software designed specifically for professional meteorologists, weather forecasters and weather enthusiasts. The software utilizes advanced numerical weather prediction (NWP) models and incorporates real-time weather data from surface observation stations, weather radars, satellites and upper air soundings to generate accurate and...
SUNSETWX image