Ephemeris Excel Calculator: Calculate Celestial Positions


ephemeris that can be used with excel to perform calculations

A powerful tool to calculate celestial object positions (azimuth/altitude) for any date, time, and location.



The local date for the observation.


The local time for the observation.


Observer’s latitude in decimal degrees (N is +, S is -).


Observer’s longitude in decimal degrees (E is +, W is -).



Select the celestial body to calculate.


Object Position

Enter values to see result

Azimuth is measured clockwise from North (N=0°, E=90°, S=180°, W=270°)

Intermediate Calculation Values

Julian Day:

Right Ascension (RA):

Declination (Dec):

Local Sidereal Time (LST):

Altitude Plot for Selected Day

Altitude of the selected celestial body over a 24-hour period.

Hourly Ephemeris Data


Time (Local) Azimuth (°) Altitude (°) Right Ascension Declination
This table shows the calculated position of the celestial body for each hour of the selected day. This data can be copied into Excel to perform calculations.

What is an ephemeris that can be used with excel to perform calculations?

An ephemeris is a set of data that provides the assigned positions of naturally occurring astronomical objects as well as artificial satellites in the sky at a given time or times. The term is often used to describe a table of such data. For users of spreadsheet software like Excel, an ephemeris calculator like this one is invaluable. It allows you to generate precise positional data (such as altitude and azimuth) for a specific location and time, which can then be exported or copied into Excel. Once in Excel, you can perform custom calculations, create advanced charts, or analyze trends, for example, to plan astrophotography sessions, architectural designs (shadow analysis), or academic research.

This tool bridges the gap between complex astronomical theory and practical application, providing the raw data needed for powerful spreadsheet analysis. See our guide on Advanced Data Analysis for more ideas.

Ephemeris Calculation Formula and Explanation

Calculating a celestial object’s position is a multi-step process that transforms date, time, and location into local sky coordinates (Altitude and Azimuth). This calculator uses simplified but effective algorithms to achieve this.

  1. Julian Day (JD): A continuous count of days since a remote epoch. It’s the standard for astronomical timekeeping.
  2. Object Position (RA/Dec): The object’s intrinsic position on the celestial sphere is calculated. This is given in the Equatorial coordinate system as Right Ascension (RA) and Declination (Dec).
  3. Local Sidereal Time (LST): This is the Right Ascension on the observer’s meridian. It’s like a celestial clock for your specific longitude.
  4. Hour Angle (HA): The difference between the LST and the object’s RA. It tells how far the object is from your local meridian.
  5. Coordinate Conversion: Finally, using spherical trigonometry, the object’s HA and Dec are combined with the observer’s latitude to produce the final Altitude and Azimuth.

The key formula for converting Equatorial to Horizontal coordinates is:

sin(Altitude) = sin(Declination) * sin(Latitude) + cos(Declination) * cos(Latitude) * cos(Hour Angle)

Key Variables in Ephemeris Calculation
Variable Meaning Unit Typical Range
Latitude (φ) Observer’s north-south position on Earth Decimal Degrees -90 to +90
Longitude (λ) Observer’s east-west position on Earth Decimal Degrees -180 to +180
Declination (δ) Angular distance of a point north or south of the celestial equator. Decimal Degrees -90 to +90
Hour Angle (H) Angular distance on the celestial equator from the observer’s meridian to the object. Decimal Degrees -180 to +180
Altitude (a) The object’s angle above the horizon. Decimal Degrees -90 to +90
Azimuth (A) The object’s direction along the horizon, measured from North. Decimal Degrees 0 to 360

Learn more about how these variables are used in our Beginner’s Guide to Celestial Mechanics.

Practical Examples

Example 1: Finding the Sun’s Position in Los Angeles

An architect needs to know the sun’s position to model shadows for a new building in downtown Los Angeles.

  • Inputs:
    • Date: June 21, 2024
    • Time: 12:00 PM
    • Latitude: 34.05 N
    • Longitude: -118.24 W
  • Results:
    • Altitude: ~79.3° (The sun is very high in the sky)
    • Azimuth: ~174.5° (Almost directly South)

Example 2: Planning Moon Photography

A photographer wants to capture the full moon rising over a mountain range and needs to know where to set up.

  • Inputs:
    • Date: September 18, 2024 (a full moon)
    • Time: 6:30 PM
    • Latitude: 39.7 N
    • Longitude: -105.0 W
  • Results:
    • Altitude: ~0.5° (The moon is just on the horizon)
    • Azimuth: ~92.1° (Almost exactly East)

For more complex scenarios, consider our Professional Photoplanning Tool.

How to Use This Ephemeris Calculator

Follow these simple steps to generate data for your Excel calculations.

  1. Set Location: Enter your Latitude and Longitude in decimal degrees. Use positive values for North/East and negative for South/West.
  2. Set Date and Time: Choose the local date and time for which you want to perform the calculation.
  3. Select Object: Choose the celestial body (e.g., Sun, Moon) from the dropdown list.
  4. Interpret Results: The primary result shows the object’s Altitude (height above horizon) and Azimuth (compass direction). The intermediate values are provided for advanced users.
  5. Export to Excel: You can highlight the hourly data in the table below, copy it (Ctrl+C or Cmd+C), and paste it directly into an Excel spreadsheet to perform calculations and create your own charts. The “Copy Results” button also provides a clean text summary.

Key Factors That Affect Ephemeris Calculations

  • Observer’s Latitude: Your north-south position is the most critical factor in determining an object’s path across the sky and its maximum altitude.
  • Observer’s Longitude: Your east-west position primarily affects the timing of events like sunrise or transit.
  • Date of the Year: The Earth’s tilt and its orbit around the Sun cause the declination of the Sun to change, leading to seasons and varying path lengths across the sky.
  • Time of Day: This determines where an object is along its daily path from rising to setting.
  • Earth’s Precession: Over long periods, the Earth’s axis wobbles, slowly changing the coordinate system itself. Modern calculations account for this.
  • Perturbations: The gravitational pull of other planets and the Moon causes slight deviations in an object’s orbit from a perfect ellipse. High-precision ephemerides must model these complex interactions. Check our post on orbital mechanics for details.

Frequently Asked Questions (FAQ)

1. What is the difference between Azimuth and Right Ascension?

Azimuth is a local coordinate, specific to your location on Earth, measuring direction along the horizon (e.g., North, East, South, West). Right Ascension is a universal coordinate fixed to the celestial sphere, analogous to longitude on Earth.

2. How accurate is this calculator?

This calculator uses well-established, simplified algorithms that are accurate to within a fraction of a degree for most planning purposes. For scientific or navigational use, official ephemerides from sources like JPL or USNO are recommended.

3. Why does the altitude sometimes show a negative number?

A negative altitude means the object is below the horizon and not visible from your location at that time.

4. Can I use this data for navigation?

No. While historically important, celestial navigation requires extremely high precision, correction for atmospheric refraction, and a sextant. This tool is for planning and educational purposes only.

5. How do I paste this data into Excel correctly?

Highlight the rows in the hourly data table, copy, and then in Excel, use “Paste Special” -> “Text” to ensure the data is imported cleanly into separate columns.

6. What time zone are the calculations based on?

The calculator uses the date and time you enter as local time and determines the UTC offset based on your computer’s settings for the Julian Day calculation. The hourly table is also displayed in local time.

7. Why are there no planets beyond the Moon?

Calculating planetary positions accurately requires much more complex algorithms and larger datasets. This calculator focuses on the Sun and Moon as they are the most frequently requested objects for general-purpose calculations.

8. What is a Julian Day?

It’s the number of days that have passed since noon Universal Time on January 1, 4713 BC. It provides a single, unambiguous number for any moment in time, which simplifies astronomical calculations. Discover more in our data science articles.

© 2024 Ephemeris Calculators Inc. For educational and planning purposes only.



Leave a Reply

Your email address will not be published. Required fields are marked *