ForHosting KIT · Unit converters

Astronomical unit converter

One astronomical unit, the Earth–Sun yardstick, is exactly 149,597,870.7 km. Convert between AU, kilometres and international miles with the exact length fixed in 2012, not a rounded 150 million, for homework, mission notes and catalogue labels. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Value
1
From
Au
To
Km
You get
Result
149,597,870.7 km
Converted
149,597,870.7
Au m
149,597,870,700
Value m
149,597,870,700

An astronomical unit converter turns a solar-system distance expressed in astronomical units into kilometres or international miles, or the reverse, using the IAU two thousand twelve exact length of one astronomical unit. Enter a finite distance, choose the source unit and the target unit among au, km, and mi, and the tool converts through SI metres with the exact constant one hundred forty-nine billion five hundred ninety-seven million eight hundred seventy thousand seven hundred metres per AU.

Why the IAU exact astronomical unit is the right length

The astronomical unit is the natural yardstick of the solar system: it is the unit in which planetary ephemerides, Keplerian elements, and most classroom problems quote the Earth–Sun scale. In two thousand twelve the International Astronomical Union fixed one astronomical unit as exactly one hundred forty-nine billion five hundred ninety-seven million eight hundred seventy thousand seven hundred metres, retiring the older Gaussian definition that had to be fitted from the solar gravitational parameter. That exact metre length is the only AU factor this converter uses.

Kilometres follow from one thousand metres in a kilometre. International statute miles follow from the exact one thousand six hundred nine point three four four metres in a mile. Converting through SI metres rather than memorized rounded tables keeps one AU equal to one hundred forty-nine million five hundred ninety-seven thousand eight hundred seventy point seven kilometres, and equal to the corresponding exact quotient in miles, so homework, mission notes, and catalog labels match engineering tables instead of a back-of-the-envelope one hundred fifty million kilometres.

Zero astronomical units map cleanly to zero kilometres and zero miles. Negative values are accepted as signed deltas when a signed change is meaningful to the caller. Teachers can contrast the exact IAU length with older rounded figures so students see why a dedicated astronomical unit converter belongs in a lab notebook rather than a mental shortcut.

Practical tips, checks, and related searches

Round-trip sanity checks are easy: convert one astronomical unit to kilometres and confirm you receive one hundred forty-nine million five hundred ninety-seven thousand eight hundred seventy point seven kilometres after rounding, then convert that kilometre figure back to au and confirm you recover one. Convert one astronomical unit to miles and confirm the international-mile quotient of the same exact metre length.

If your source table quotes light-years or parsecs, this landing is the wrong tool—those scales belong on a broader astronomical-distance converter, not on an astronomical-unit page that is meant to answer AU to kilometres and AU to miles. Stay inside the absolute range so the product cannot overflow into a non-finite result the solver must reject. When teaching unit analysis, pair the Earth–Sun distance of one AU with a spacecraft distance such as a few dozen AU so students see linear scaling and the same IAU constant on every row.

This landing targets people searching for astronomical unit converter, AU to km, AU to miles, or how many kilometres in an astronomical unit; it is not a light-year hub, not a parsec calculator, and not a general multi-unit astronomy toolbox. Prefer this capability when the input is already an AU, kilometre, or mile distance and you only need the other of those three.

Planet and spacecraft distance labels

Turn AU figures from ephemerides and mission briefs into kilometres or miles for exhibits, apps, and public outreach with the same IAU exact length every row.

Homework and exam unit checks

Students convert textbook astronomical-unit distances to kilometres or miles and compare hand work against deterministic steps before submitting astronomy problem sets.

How many miles are in one astronomical unit?

Divide the exact AU length 149597870700 m by the international statute mile of 1609.344 m. The converter returns that quotient rounded to twelve decimal places.

Which definition of the astronomical unit is used?

The IAU 2012 exact length of 149597870700 metres. Older Gaussian or rounded 150 million kilometre figures are not used.

Is the astronomical unit converter free?

The browser tool is free and runs locally.

How many kilometres is one astronomical unit?

Exactly 149,597,870.7 km. Since 2012 the astronomical unit has been fixed at 149,597,870,700 metres, so dividing by 1,000 gives the kilometre figure with no rounding.

Why not just use 150 million kilometres?

Because it is a rounded figure, close but not exact. Working from the exact length keeps homework, mission notes and catalogue labels consistent with engineering tables, and converting the result back always returns exactly 1 AU.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/conv/astronomical-unit

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/conv/astronomical-unit \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"value":1,"from":"au","to":"km"}'
{
  "value": 1,
  "from": "au",
  "to": "km"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "conv.astronomical_unit",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

max_abs1e+30
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Invalid or non-finite input fails with a clear invalid_input error instead of inventing a number.

How to call the API and what comes back

Canonical unit tokens are au, km, and mi. Absolute values must stay within the published limit. Send a JSON body with three required fields: value, a finite number for the distance magnitude; from, the source unit; and to, the target unit. Aliases such as distance, amount, from_unit, to_unit, astronomical unit, kilometre, and mile are accepted so SDK clients and form posts can use the name that fits the product. On success the response echoes the rounded value, sets from and to to canonical tokens, sets result, converted, and unit to the converted distance and its unit, au_m to the exact IAU metre constant, value_m to the SI intermediate, factor to the rounded from-to multiplier, formula to the string result equals value times open parenthesis to_m of from over to_m of to close parenthesis, message to a short English summary, steps to an ordered array of substitution lines, and supported_units to the three tokens. Failed validation—missing fields, non-finite numbers, bare plus or minus signs, non-numeric strings, unknown unit names, values outside absolute limits, or a non-finite converted result—returns invalid_input and is never charged. Pricing is a flat $0.002 per successful request with unit item. Prefer bare numbers when you control the client; string numbers are accepted only when they match a strict finite numeric pattern without unit suffixes or thousand separators in the payload.

Practical tips, checks, and related searches

Failed tasks that return invalid_input do not consume prepaid balance, which keeps exploratory scripts cheap when learners deliberately omit value or pass text instead of a finite number.

Unit-test fixtures for solar-system code

Engineers pin golden JSON for one-AU and multi-AU cases so browser and API arithmetic never drift across releases when software talks in km or miles.

How many kilometres are in one astronomical unit?

Exactly 149597870.7 km, because the IAU 2012 definition fixes 1 au = 149597870700 m and one kilometre is 1000 m.

What happens if the input is not a finite number?

The API returns invalid_input naming the problem, for example that value must be a finite number. Failed tasks are not charged.

Read the full KIT documentation →