Products
  • Wolfram|One

    The definitive Wolfram Language and notebook experience

  • Mathematica

    The original technical computing environment

  • Wolfram Notebook Assistant + LLM Kit

    All-in-one AI assistance for your Wolfram experience

  • System Modeler
  • Wolfram Player
  • Finance Platform
  • Wolfram Engine
  • Enterprise Private Cloud
  • Application Server
  • Wolfram|Alpha Notebook Edition
  • Wolfram Cloud App
  • Wolfram Player App

More mobile apps

Core Technologies of Wolfram Products

  • Wolfram Language
  • Computable Data
  • Wolfram Notebooks
  • AI & Linguistic Understanding

Deployment Options

  • Wolfram Cloud
  • wolframscript
  • Wolfram Engine Community Edition
  • Wolfram LLM API
  • WSTPServer
  • Wolfram|Alpha APIs

From the Community

  • Function Repository
  • Community Paclet Repository
  • Example Repository
  • Neural Net Repository
  • Prompt Repository
  • Wolfram Demonstrations
  • Data Repository
  • Group & Organizational Licensing
  • All Products
Consulting & Solutions

We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

  • Data & Computational Intelligence
  • Model-Based Design
  • Algorithm Development
  • Wolfram|Alpha for Business
  • Blockchain Technology
  • Education Technology
  • Quantum Computation

WolframConsulting.com

Wolfram Solutions

  • Data Science
  • Artificial Intelligence
  • Biosciences
  • Healthcare Intelligence
  • Sustainable Energy
  • Control Systems
  • Enterprise Wolfram|Alpha
  • Blockchain Labs

More Wolfram Solutions

Wolfram Solutions For Education

  • Research Universities
  • Colleges & Teaching Universities
  • Junior & Community Colleges
  • High Schools
  • Educational Technology
  • Computer-Based Math

More Solutions for Education

  • Contact Us
Learning & Support

Get Started

  • Wolfram Language Introduction
  • Fast Intro for Programmers
  • Fast Intro for Math Students
  • Wolfram Language Documentation

More Learning

  • Highlighted Core Areas
  • Demonstrations
  • YouTube
  • Daily Study Groups
  • Wolfram Schools and Programs
  • Books

Grow Your Skills

  • Wolfram U

    Courses in computing, science, life and more

  • Community

    Learn, solve problems and share ideas.

  • Blog

    News, views and insights from Wolfram

  • Resources for

    Software Developers

Tech Support

  • Contact Us
  • Support FAQs
  • Support FAQs
  • Contact Us
Company
  • About Wolfram
  • Career Center
  • All Sites & Resources
  • Connect & Follow
  • Contact Us

Work with Us

  • Student Ambassador Initiative
  • Wolfram for Startups
  • Student Opportunities
  • Jobs Using Wolfram Language

Educational Programs for Adults

  • Summer School
  • Winter School

Educational Programs for Youth

  • Middle School Camp
  • High School Research Program
  • Computational Adventures

Read

  • Stephen Wolfram's Writings
  • Wolfram Blog
  • Wolfram Tech | Books
  • Wolfram Media
  • Complex Systems

Educational Resources

  • Wolfram MathWorld
  • Wolfram in STEM/STEAM
  • Wolfram Challenges
  • Wolfram Problem Generator

Wolfram Initiatives

  • Wolfram Science
  • Wolfram Foundation
  • History of Mathematics Project

Events

  • Stephen Wolfram Livestreams
  • Online & In-Person Events
  • Contact Us
  • Connect & Follow
Wolfram|Alpha
  • Your Account
  • User Portal
  • Wolfram Cloud
  • Products
    • Wolfram|One
    • Mathematica
    • Wolfram Notebook Assistant + LLM Kit
    • System Modeler
    • Wolfram Player
    • Finance Platform
    • Wolfram|Alpha Notebook Edition
    • Wolfram Engine
    • Enterprise Private Cloud
    • Application Server
    • Wolfram Cloud App
    • Wolfram Player App

    More mobile apps

    • Core Technologies
      • Wolfram Language
      • Computable Data
      • Wolfram Notebooks
      • AI & Linguistic Understanding
    • Deployment Options
      • Wolfram Cloud
      • wolframscript
      • Wolfram Engine Community Edition
      • Wolfram LLM API
      • WSTPServer
      • Wolfram|Alpha APIs
    • From the Community
      • Function Repository
      • Community Paclet Repository
      • Example Repository
      • Neural Net Repository
      • Prompt Repository
      • Wolfram Demonstrations
      • Data Repository
    • Group & Organizational Licensing
    • All Products
  • Consulting & Solutions

    We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

    WolframConsulting.com

    Wolfram Solutions

    • Data Science
    • Artificial Intelligence
    • Biosciences
    • Healthcare Intelligence
    • Sustainable Energy
    • Control Systems
    • Enterprise Wolfram|Alpha
    • Blockchain Labs

    More Wolfram Solutions

    Wolfram Solutions For Education

    • Research Universities
    • Colleges & Teaching Universities
    • Junior & Community Colleges
    • High Schools
    • Educational Technology
    • Computer-Based Math

    More Solutions for Education

    • Contact Us
  • Learning & Support

    Get Started

    • Wolfram Language Introduction
    • Fast Intro for Programmers
    • Fast Intro for Math Students
    • Wolfram Language Documentation

    Grow Your Skills

    • Wolfram U

      Courses in computing, science, life and more

    • Community

      Learn, solve problems and share ideas.

    • Blog

      News, views and insights from Wolfram

    • Resources for

      Software Developers
    • Tech Support
      • Contact Us
      • Support FAQs
    • More Learning
      • Highlighted Core Areas
      • Demonstrations
      • YouTube
      • Daily Study Groups
      • Wolfram Schools and Programs
      • Books
    • Support FAQs
    • Contact Us
  • Company
    • About Wolfram
    • Career Center
    • All Sites & Resources
    • Connect & Follow
    • Contact Us

    Work with Us

    • Student Ambassador Initiative
    • Wolfram for Startups
    • Student Opportunities
    • Jobs Using Wolfram Language

    Educational Programs for Adults

    • Summer School
    • Winter School

    Educational Programs for Youth

    • Middle School Camp
    • High School Research Program
    • Computational Adventures

    Read

    • Stephen Wolfram's Writings
    • Wolfram Blog
    • Wolfram Tech | Books
    • Wolfram Media
    • Complex Systems
    • Educational Resources
      • Wolfram MathWorld
      • Wolfram in STEM/STEAM
      • Wolfram Challenges
      • Wolfram Problem Generator
    • Wolfram Initiatives
      • Wolfram Science
      • Wolfram Foundation
      • History of Mathematics Project
    • Events
      • Stephen Wolfram Livestreams
      • Online & In-Person Events
    • Contact Us
    • Connect & Follow
  • Wolfram|Alpha
  • Wolfram Cloud
  • Your Account
  • User Portal
Wolfram Language & System Documentation Center
AstroDistance
  • See Also
    • AstroPosition
    • AstroAngularSeparation
    • GeoDistance
  • Related Guides
    • Astronomical Computation & Data
    • See Also
      • AstroPosition
      • AstroAngularSeparation
      • GeoDistance
    • Related Guides
      • Astronomical Computation & Data

AstroDistance[astro]

returns the physical distance to the astronomical object astro as currently observed from your geo location.

AstroDistance[astro,astro0]

returns the physical distance to the astronomical object astro as currently observed from astro0.

AstroDistance[astro,Dated[astro0,date]]

returns the physical distance to astro as observed from astro0 on the given date.

Details
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Applications  
Properties & Relations  
See Also
Related Guides
History
Cite this Page
BUILT-IN SYMBOL
  • See Also
    • AstroPosition
    • AstroAngularSeparation
    • GeoDistance
  • Related Guides
    • Astronomical Computation & Data
    • See Also
      • AstroPosition
      • AstroAngularSeparation
      • GeoDistance
    • Related Guides
      • Astronomical Computation & Data

AstroDistance

AstroDistance[astro]

returns the physical distance to the astronomical object astro as currently observed from your geo location.

AstroDistance[astro,astro0]

returns the physical distance to the astronomical object astro as currently observed from astro0.

AstroDistance[astro,Dated[astro0,date]]

returns the physical distance to astro as observed from astro0 on the given date.

Details

  • AstroDistance computes distances between specific locations moving through space, such as centers of celestial bodies or points on their surfaces.
  • In AstroDistance[astro1,astro0], the astro objects are given as astronomical entities, such as Entity["Planet","Mars"], representing the center of the celestial body, or as locations referred to their surface, such as GeoPosition[{lat,lon,h},"Mars"] or Entity["SolarSystemFeature", "OlympusMonsMars"]. Strings representing physical locations, such as "JupiterBarycenter", can also be used.
  • In AstroDistance[astro,astro0], the observation astro0 must be a location within the solar system, but the target location astro can be a deep-sky object, such as stars or galaxies.
  • The instant of observation, in the BCRS coordinates of the solar system, is determined by the second argument of AstroDistance, and it will be taken to be the current instant by default.
  • In AstroDistance[astro,astro0], for astro objects outside the solar system, the result is always astrometric, i.e. giving the distance to the location from which the light was emitted and not to the location where astro was at the observation date.
  • In AstroDistance[astro,astro0], for astro objects in the solar system, the result is corrected for light time by default, but can be made geometric using AstroDistance[astro,{astro0,"LightTime""Geometric"}].

Examples

open all close all

Basic Examples  (3)

Find the current distance to the center of Venus from your geo location:

Find the distance to the center of Venus as observed from a point on the surface of the Moon:

Plot the distance between the centers of Jupiter and Earth, between years 2015 and 2030:

Scope  (5)

Find the distance to the center of Jupiter as currently measured from the center of Mars:

This can also be expressed in these alternative forms:

Find the distance to the center of Jupiter from a point on the surface of Venus:

Compare with the distance between centers:

The difference is smaller than the radius of Venus, depending on the current geometric configuration:

Use geo entities for locations on the surface of the Earth or entities representing solar system features:

Compute the between the Sun and the solar system barycenter:

Compute the distance for the next 100 years, in units of gigameters, or millions of kilometers:

Compute distances to a list of astronomical objects:

The result is given in QuantityArray form:

Use Normal to convert it to a list of Quantity distances:

Applications  (4)

Construct a function that computes the geometric distance between the centers of Jupiter and Earth for a given Gregorian year:

Plot that distance between years 2020 and 2026:

Find the instant of closest approach in 2022:

Convert to the standard Gregorian calendar:

This is the distance between the Earth and the Sun for day d of year 2022:

Due to the eccentricity of Earth's orbit, the distance oscillates around 1 AU during a year:

The perihelion of a planet is defined as the moment of closest approach to the Sun:

In 2022 it happened on January 4, around 7am GMT:

The aphelion is defined as the moment of maximum distance to the Sun:

In 2022 it happened on July 4, also around 7am GMT:

Find the distance to the star Vega:

Compare to the distance observed from the Sun:

It oscillates around 1 AU as the Earth orbits around the Sun during a year:

The distance from the Sun also changes in time, due to proper motion of the star:

The distance is decreasing about 2.5 au per year, as reflected by the negative radial velocity of Vega:

Compare the relative size of the Sun as currently observed from the different planets:

Properties & Relations  (3)

AstroDistance[astro,obsrvr] is equivalent to AstroPosition[astro,obsrvr]["Distance"]:

AstroDistance[astro1,astro2] takes into account the time that light takes to propagate from astro1 to astro2. Compute the distance at which Jupiter can be seen from Mars on this date:

This is the time that light takes to travel that distance:

This is the distance without taking into account that Jupiter moves during that time:

The difference is of the order of 10,000 miles:

This is the distance at which Mars can be seen from Jupiter at the same instant:

These results do not coincide:

However, the computation without light-time correction does coincide:

Use GeoPositionENU to compute the Euclidean distance to Principe Island from your location:

GeoDistance gives distances on the surface of the Earth, which are therefore longer:

Compare the Euclidean distance with the distance given by AstroDistance:

Deactivate all astrometric corrections to obtain full agreement:

See Also

AstroPosition  AstroAngularSeparation  GeoDistance

Related Guides

    ▪
  • Astronomical Computation & Data

History

Introduced in 2022 (13.2)

Wolfram Research (2022), AstroDistance, Wolfram Language function, https://reference.wolfram.com/language/ref/AstroDistance.html.

Text

Wolfram Research (2022), AstroDistance, Wolfram Language function, https://reference.wolfram.com/language/ref/AstroDistance.html.

CMS

Wolfram Language. 2022. "AstroDistance." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/AstroDistance.html.

APA

Wolfram Language. (2022). AstroDistance. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/AstroDistance.html

BibTeX

@misc{reference.wolfram_2025_astrodistance, author="Wolfram Research", title="{AstroDistance}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/AstroDistance.html}", note=[Accessed: 01-December-2025]}

BibLaTeX

@online{reference.wolfram_2025_astrodistance, organization={Wolfram Research}, title={AstroDistance}, year={2022}, url={https://reference.wolfram.com/language/ref/AstroDistance.html}, note=[Accessed: 01-December-2025]}

Top
Introduction for Programmers
Introductory Book
Wolfram Function Repository | Wolfram Data Repository | Wolfram Data Drop | Wolfram Language Products
Top
  • Products
  • Wolfram|One
  • Mathematica
  • Notebook Assistant + LLM Kit
  • System Modeler

  • Wolfram|Alpha Notebook Edition
  • Wolfram|Alpha Pro
  • Mobile Apps

  • Wolfram Player
  • Wolfram Engine

  • Volume & Site Licensing
  • Server Deployment Options
  • Consulting
  • Wolfram Consulting
  • Repositories
  • Data Repository
  • Function Repository
  • Community Paclet Repository
  • Neural Net Repository
  • Prompt Repository

  • Wolfram Language Example Repository
  • Notebook Archive
  • Wolfram GitHub
  • Learning
  • Wolfram U
  • Wolfram Language Documentation
  • Webinars & Training
  • Educational Programs

  • Wolfram Language Introduction
  • Fast Introduction for Programmers
  • Fast Introduction for Math Students
  • Books

  • Wolfram Community
  • Wolfram Blog
  • Public Resources
  • Wolfram|Alpha
  • Wolfram Problem Generator
  • Wolfram Challenges

  • Computer-Based Math
  • Computational Thinking
  • Computational Adventures

  • Demonstrations Project
  • Wolfram Data Drop
  • MathWorld
  • Wolfram Science
  • Wolfram Media Publishing
  • Customer Resources
  • Store
  • Product Downloads
  • User Portal
  • Your Account
  • Organization Access

  • Support FAQ
  • Contact Support
  • Company
  • About Wolfram
  • Careers
  • Contact
  • Events
Wolfram Community Wolfram Blog
Legal & Privacy Policy
WolframAlpha.com | WolframCloud.com
© 2025 Wolfram
© 2025 Wolfram | Legal & Privacy Policy |
English