Audited ·Last updated 29 Jul 2026·7 citations·Tier 1·0 uses

Kepler's Third Law Calculator

Kepler's third law calculator in the harmonic ratio form — no mass, no G. Solve orbital period from distance, or distance from period, in AU and years.

Kepler's Third Law Calculator

Solve for
Mean distance of the body you are solving for, in astronomical units (1 AU = 149 597 870 700 m exactly). Default is Mars, 1.52371034 AU (JPL). Used when solving for the period.
AU
Sidereal period of the body you are solving for, in Julian years of 365.25 days. Default is Mars, 1.8808476 yr (JPL). Used when solving for the semi-major axis.
yr
A known orbit around the SAME central body. Default is Earth's, 1.00000261 AU (JPL/Standish).
AU
Sidereal period of that same known orbit, in Julian years. Default is Earth's, 1.0000174 yr (JPL).
yr
Orbital period
1.9
Sidereal orbital period of the target body in Julian years of exactly 365.25 days.
Orbital period (days)
687
Semi-major axis
1.5237 AU
Semi-major axis (km)
227,943,822.428 km
Kepler constant k = T² / a³
1 yr² AU⁻³
Implied central mass
1 M☉
Implied central mass (kg)
1,988,431,352,460,000,000,000,000,000,000 kg
Regime and limits
Harmonic (ratio) form of Kepler's third law: no mass and no gravitational constant are used, only the reference orbit. Distances are in astronomical units (1 au = 149 597 870 700 m exactly) and periods in Julian years (365.25 days exactly). The law is exact only when both orbiting bodies are negligible next to the central body; the omitted factor is sqrt((M + m_ref)/(M + m_target)), which is about 0.03 % for a Jupiter-mass target and far smaller for anything terrestrial. Your reference orbit gives k within 1 % of 1 yr² au⁻³, the heliocentric value, so these results are on the solar-system scale.

Background.

This calculator applies Kepler's third law in its original harmonic form: the square of an orbital period is proportional to the cube of the semi-major axis, T² ∝ a³. Give it one orbit you already know around some central body — Earth's, by default — and it will convert any second orbit around that same body between period and distance, in either direction. It needs no mass, no gravitational constant, and no SI conversion at all, because the constant of proportionality is supplied entirely by your reference orbit.

That mass-free framing is deliberate, and it is what separates this page from the Orbital Period calculator elsewhere in this category. The Orbital Period page implements Newton's generalisation, T = 2π√(a³/G(M+m)), which requires the central mass in kilograms and works in metres and seconds. Kepler published the harmonic law in 1619, sixty-eight years before Newton explained why it holds; the law itself never mentions mass. If you know the central mass and want SI units, use Orbital Period. If you know one orbit and want another — which is the ordinary classroom and observing case — this is the faster and more accurate route, because a ratio between two orbits cancels most of the uncertainty that a mass-based calculation carries.

Units are declared and fixed. Distances are astronomical units, where 1 AU = 149 597 870 700 m exactly by the IAU's 2012 definition. Periods are Julian years of exactly 365.25 days, or 31 557 600 seconds. The Kepler constant k = T²/a³ therefore has units of yr² AU⁻³ and takes the value 1 for an idealised massless body orbiting the Sun. The calculator reports k explicitly so you can see at a glance whether your reference orbit really is heliocentric: enter Jupiter's moons or a binary star and k will not be 1, and the note beside the results will say so.

The results also carry an important warning that belongs beside the number rather than buried in an FAQ. The harmonic law is exact only when both orbiting bodies are negligible in mass next to the central one. The full Newtonian relation is T² = 4π²a³/G(M+m), so a ratio between two orbits leaves behind a factor of √((M+m_reference)/(M+m_target)). For Mars, whose mass is about 3 × 10⁻⁷ of the Sun's, that factor is invisible. For Jupiter, whose mass is about 1/1048 of the Sun's, it is not: feeding Jupiter's 11.862615-year period into this calculator against an Earth reference returns a semi-major axis of 5.201354 AU, whereas JPL's fitted value is 5.202887 AU. The 0.029 % shortfall is not an arithmetic error — it is precisely the mass term the harmonic law omits, and multiplying by (1 + m/M)^(1/3) = 1.000318 recovers 5.203009 AU. Wherever the two orbiting bodies have comparable masses, as in a binary star, the harmonic form should not be used at all.

A second output makes the same physics work for you. Because a reference orbit fixes k, it also fixes the central mass: M = 4π²a³/(GT²). The calculator reports that implied mass both in kilograms and as a multiple of the solar mass. The solar-mass ratio is the more trustworthy of the two, since the gravitational constant cancels out of it entirely and G is the least precisely known constant in physics at 22 parts per million. This is, in outline, how astronomers weigh stars they will never visit: observe a companion's period and separation, and the central mass follows.

Every figure quoted on this page comes from JPL's Solar System Dynamics tables and NIST's CODATA 2022 adjustment, both retrieved in July 2026, and every number in the worked example below is the calculator's own output rather than a remembered value.

What is kepler's third law calculator?

Kepler's third law — the harmonic law, or law of harmonies — states that for every body orbiting the same central mass, the square of the orbital period divided by the cube of the semi-major axis is the same number. Kepler announced it on 15 May 1618 and published it in Harmonices Mundi in 1619, deriving it purely from Tycho Brahe's observational record with no theory of gravity behind it.

Written as a ratio between two orbits it becomes T₁²/T₂² = a₁³/a₂³, which is the form implemented here. Written with a single constant it becomes T² = k·a³, where k depends only on the central body. Choosing astronomical units and Julian years makes k equal to 1 for the solar system, which is why introductory astronomy quotes the law as simply T² = a³ — that is not a different law, it is the same law in a unit system chosen to hide the constant.

The semi-major axis a is half the long axis of the ellipse, equal to the average of the closest and farthest distances from the focus. It is not the same as the instantaneous distance, and the law is indifferent to eccentricity: a circular orbit and a violently elongated cometary orbit with the same semi-major axis have exactly the same period. The period T here is the sidereal period, measured against the fixed stars, not the synodic period seen from a moving Earth.

How to use this calculator.

  1. Choose whether you are solving for the orbital period or for the semi-major axis.
  2. Enter the reference orbit — a body whose period and distance you already know, orbiting the SAME central object. Earth's values are pre-filled.
  3. Enter the one quantity you do know about the target orbit: its semi-major axis in AU, or its period in Julian years.
  4. Read the answer in years and days, or in AU and kilometres.
  5. Check the reported Kepler constant k. A value near 1 yr² AU⁻³ confirms a heliocentric system; anything else means your reference orbit is around a different body.
  6. Read the implied central mass if you want the reference orbit's other payoff — this is how a star or planet gets weighed from an orbit.
  7. Read the regime note before trusting the last digits: if the target body's mass is more than about a thousandth of the central mass, apply the (1 + m/M)^(1/3) correction described below.

The formula.

T² ⁄ a³ = T_ref² ⁄ a_ref³ ⇒ T = √(k · a³), a = (T² ⁄ k)^(1⁄3), k = T_ref² ⁄ a_ref³

The calculator does two things. First it forms the Kepler constant from your reference orbit, k = T_ref²/a_ref³, in units of yr² AU⁻³. With Earth's values of a_ref = 1.00000261 AU and T_ref = 1.0000174 yr this gives k = 1.0000269701, close to but not exactly the textbook 1 — the difference is real, and it exists because the 'Earth' orbit tabulated by JPL is the orbit of the Earth–Moon barycentre and its period is set by GM_Sun plus GM_Earth plus GM_Moon, not GM_Sun alone.

Then it inverts whichever relation you asked for. Solving for the period gives T = √(k·a³); solving for the distance gives a = (T²/k)^(1/3). Both are exact algebraic inversions of one another, so feeding an answer back in returns the original input — a property the test suite checks explicitly with Saturn's orbit.

ROUNDING STAGE. Nothing is rounded part-way through. All arithmetic runs at 40 significant digits in a dedicated high-precision decimal context, and rounding happens once, at the moment a result is returned: 10 decimal places for periods, axes and k, and 12 significant digits for kilometres and masses, because those span many orders of magnitude and a fixed decimal place would flatten a small orbit to zero. If you compare a day figure against a year figure you may see a difference in the eleventh digit; that is the display rounding, not the computation.

SIGNIFICANT FIGURES. The inputs govern the output. JPL's semi-major axes are given to nine significant figures and its tabulated periods to eight, so results are meaningful to roughly seven or eight figures at best, and to fewer than that whenever the target body's mass is not negligible. Quoting the tenth decimal place of an answer is display precision, not accuracy.

INVALID DOMAIN. Every input must be strictly positive. A zero reference semi-major axis makes k = T²/a³ divide by zero; a zero reference period makes k = 0, and the inverse solve (T²/k)^(1/3) then has no answer. A negative or zero target value describes an unbound parabolic or hyperbolic trajectory, which has no period at all. In each case the calculator raises a labelled error against the offending field rather than returning NaN or infinity.

APPROXIMATION REGIME. Two-body Newtonian gravity, both orbiting bodies negligible next to the central one, no perturbations from other planets, no general-relativistic correction. Mercury's perihelion precesses by 43 arcseconds per century for relativistic reasons, but its period is unaffected at this precision. The regime that genuinely fails is comparable masses: for a binary star, the harmonic ratio form is simply the wrong tool, and the Newtonian form with the total mass must be used instead.

A worked example.

Example

How long is a year on Mars? Take Earth as the reference orbit: JPL gives its semi-major axis as 1.00000261 AU and its sidereal period as 1.0000174 years. The Kepler constant is therefore k = 1.0000174² ⁄ 1.00000261³ = 1.0000269701 yr² AU⁻³. Mars's semi-major axis is 1.52371034 AU, whose cube is 3.53752… AU³. Multiply by k and take the square root: T = √(1.0000269701 × 1.52371034³) = 1.8808730272 years. Converted at the exact Julian year of 365.25 days, that is 686.9888731884 days, and Mars's mean distance is 227 943 822.428 km. Now check it against a source that never used this law. JPL's Planetary Physical Parameters table lists Mars's sidereal orbital period as 1.8808476 years, or 686.9795859 days, from a numerical fit to the DE440 ephemeris. The harmonic law overshoots by 0.0093 days — about thirteen minutes over a Martian year, a relative error of 1.35 × 10⁻⁵. That residual is exactly what the theory predicts it should be: the ratio form drops the mass term, and Earth and Mars are not equally massive. The same reference orbit also weighs the Sun. M = 4π²a³/(GT²) with a = 1.00000261 AU and T = 1.0000174 yr gives 1.98843135 × 10³⁰ kg, or 1.0000108 solar masses on JPL's own GM_Sun. The 11-part-per-million excess is the Earth–Moon system's own mass showing up in the answer, precisely as the physics requires.

target Semi Major Axis Au1.524
target Period Years1.881
reference Semi Major Axis Au1
reference Period Years1
solve Forperiod

Frequently asked questions.

How is this different from the Orbital Period calculator?
They implement two different statements of the same physics. Orbital Period implements Newton's generalisation, T = 2π√(a³/G(M+m)): it needs the central mass in kilograms, works in metres and seconds, and only solves for T. This page implements Kepler's original harmonic law, which needs no mass and no gravitational constant at all — only a second orbit around the same body — and solves in both directions, giving distance from period as readily as period from distance. Use Orbital Period when you know a mass; use this page when you know another orbit.
Why is the Kepler constant 1.0000269701 and not exactly 1?
Because the reference orbit is not quite an idealised massless body around the Sun. JPL's 'Earth' orbital elements describe the Earth–Moon barycentre, and the period of that orbit is set by GM_Sun + GM_Earth + GM_Moon. Rounding the inputs to a = 1 AU and T = 1 yr would give k = 1 exactly, which is the textbook convention, but it would be hiding a real 27-parts-per-million effect. The calculator reports k so you can see it rather than assume it.
Does the law work for elliptical orbits, or only circles?
It works for every bound orbit regardless of eccentricity, provided you use the semi-major axis and not the instantaneous distance. The semi-major axis is half the long axis of the ellipse, which equals the average of the perihelion and aphelion distances. Halley's Comet, with an eccentricity near 0.967, obeys the same T² ∝ a³ relation as a nearly circular planet. What changes with eccentricity is the speed at each point in the orbit, not the time to complete it.
Can I use it for moons of Jupiter or satellites of Earth?
Yes, and this is where the ratio form is at its most convenient. Pick one moon whose period and distance you know, enter it as the reference, and every other moon of that planet follows. The reported Kepler constant will be nowhere near 1 yr² AU⁻³ — for the Galilean moons it is of order 10⁻⁸ — and the calculator will say so in the regime note, which is the intended signal that you have left the heliocentric case. The implied central mass output then gives you the planet's mass.
Where exactly does the harmonic law break down?
When the orbiting masses stop being negligible. Newton's version is T² = 4π²a³/G(M+m), so a ratio between two orbits carries a leftover factor of √((M+m_ref)/(M+m_target)). Solving for Jupiter's semi-major axis from its 11.862615-year period against an Earth reference returns 5.201354 AU against JPL's fitted 5.202887 AU, a 0.029 % shortfall. Multiplying by (1 + m/M)^(1/3) = 1.000318 gives 5.203009 AU and removes about 96 % of the error. For a binary star with two comparable masses the ratio form should not be used at all.
Which year and which AU does the calculator use?
The Julian year of exactly 365.25 days — 31 557 600 seconds — as used throughout the IAU system, and the astronomical unit fixed by the IAU's 2012 resolution at exactly 149 597 870 700 metres. Both are definitions rather than measurements, so neither contributes any uncertainty. Note that the Julian year is not the tropical year of about 365.2422 days that the calendar tracks; mixing the two is a common source of a 0.02 % discrepancy.
What is the sidereal period, and is that what I get?
Yes. The sidereal period is one complete orbit measured against the distant fixed stars, and it is the only period the harmonic law describes. The synodic period — the interval between successive oppositions or conjunctions as seen from a moving Earth — is a different and usually longer quantity: Mars's sidereal period is 687 days but its synodic period is about 780 days. If you want the second of those, use the Synodic Period calculator.
How does this weigh a star?
A reference orbit fixes both k and the central mass, through M = 4π²a³/(GT²). Observe any companion's period and semi-major axis and the mass of what it orbits drops out. The calculator reports the answer twice: in kilograms, which inherits the 22-parts-per-million uncertainty of the gravitational constant G, and in solar masses, in which G cancels exactly and the answer is far more precise. Astronomers almost always quote stellar masses in solar masses for exactly this reason.
Why does the calculator refuse a zero or negative input?
Every one of them is a genuine singularity rather than a stylistic objection. A zero reference semi-major axis makes k = T²/a³ divide by zero. A zero reference period makes k = 0, and the inverse solve a = (T²/k)^(1/3) then has no value. A zero or negative target describes a parabolic or hyperbolic trajectory, which is unbound and has no period at all. Rather than return NaN or infinity, the calculator raises an error against the specific field so you can see which input is at fault.
Do relativity or planetary perturbations change the answer?
Not at the precision this page can claim. General relativity makes Mercury's perihelion precess by 43 arcseconds per century, but precession rotates the ellipse rather than changing its period, and the relativistic correction to the period itself is of order 10⁻⁸ for Mercury and smaller elsewhere. Mutual planetary perturbations matter more — Jupiter and Saturn pull on each other by parts in 10⁵ — which is one reason the tabulated JPL periods come from numerical integration rather than from Kepler's law.

References& sources.

  1. [1]Kepler, J. (1619). Harmonices Mundi, Liber V, Caput III — the original statement of the harmonic law. Print/bibliographic reference; no authoritative free full-text URL is offered here rather than linking a scan of uncertain provenance.
  2. [2]Newton, I. (1687). Philosophiae Naturalis Principia Mathematica, Book I, Proposition XV and Book III, Proposition IV — the generalisation that introduces the mass term this page deliberately omits. Print/bibliographic reference.
  3. [3]NASA JPL Solar System Dynamics, 'Approximate Positions of the Planets' (Standish & Williams), Table 1: Keplerian elements and rates referred to the mean ecliptic and equinox of J2000, valid 1800–2050. Source of every semi-major axis and eccentricity used on this page. Independent, open access. Retrieved 2026-07-29.
  4. [4]NASA JPL Solar System Dynamics, 'Planetary Physical Parameters', main planetary table, column 'Sidereal Orbital Period (y)'. Source of the independently fitted periods used to check the worked example (Mars 1.8808476 y; Jupiter 11.862615 y). Independent, open access. Retrieved 2026-07-29.
  5. [5]NASA JPL Solar System Dynamics, 'Astrodynamic Constants': astronomical unit 149 597 870 700 m (IAU 2012), heliocentric gravitational constant GM_Sun = 1.327 124 400 412 794 19 × 10²⁰ m³ s⁻² from ephemeris DE440 (Park et al. 2021). Independent, open access. Retrieved 2026-07-29.
  6. [6]NIST, CODATA 2022 recommended value of the Newtonian constant of gravitation: G = 6.674 30(15) × 10⁻¹¹ m³ kg⁻¹ s⁻², relative standard uncertainty 2.2 × 10⁻⁵. Independent, open access. Retrieved 2026-07-29.
  7. [7]NASA Science, 'Mars Facts' (page editor Stephen Carney, updated 10 July 2026): 'A year on Mars lasts 669.6 sols, which is the same as 687 Earth days.' Used only as an editorial sanity check on the worked example, not as a numerical source. Independent, open access. Retrieved 2026-07-29.

In this category

Embed

Quanta Pro

Paid features are coming later.

  • All 682 calculators remain free
  • No billing is enabled
Coming soon