Understanding the Kepler's equation solver — concept and principle
Kepler's equation links time to position on an elliptical orbit. Given the mean anomaly M (which grows uniformly with time) and the eccentricity e, this calculator finds the eccentric anomaly E, the true anomaly ν (the actual angle of the body from periapsis) and the distance r as a fraction of the semi-major axis a.
How it is calculated
- Kepler's equation: M = E − e sin E (radians), solved with Newton's method: Eₙ₊₁ = Eₙ − (Eₙ − e sin Eₙ − M) / (1 − e cos Eₙ), starting from E₀ = M.
- True anomaly: ν = 2 atan2(√(1+e) sin(E/2), √(1−e) cos(E/2)).
- Distance: r/a = 1 − e cos E.
The mean anomaly is entered in degrees; e must be between 0 (circle) and just below 1 (very elongated ellipse).
The principle
Kepler's second law says a planet sweeps out equal areas in equal times. The mean anomaly M = n(t − T), where n = 2π/P is the mean motion, is the angle a fictitious body moving at constant speed would have. The eccentric anomaly is a geometric helper angle measured on a circle drawn around the ellipse. Working out the area swept from periapsis gives exactly M = E − e sin E. Once E is known, the ellipse geometry gives ν and r directly. Newton's method converges very fast here because the derivative 1 − e cos E is never zero for e < 1.
Worked example
- Inputs: M = 45° = 0.785398 rad, e = 0.2.
- Start with E₀ = M. After one Newton step E ≈ 54.4375°, after two ≈ 54.30658°, after three the value stops changing.
- Converged: E = 54.30655693° (0.947828 rad). Check: 0.947828 − 0.2 × sin(0.947828) = 0.947828 − 0.162430 = 0.785398 rad.
- True anomaly: ν = 64.27172656°.
- Distance: 1 − 0.2 × cos(54.30656°) = 0.8833103455, so the body is at 88.3% of a.
| Mean anomaly (°) | Eccentric anomaly (°) |
|---|---|
| 11.2 | 14.02757075 |
| 22.5 | 27.85393722 |
| 33.8 | 41.31537132 |
| 45 | 54.30655693 |
| 56.2 | 66.7810191 |
| 67.5 | 78.73852342 |
| 90 | 101.2393854 |
How to read the result
For a circular orbit (e = 0) all three angles are equal. On an ellipse the body moves fastest near periapsis, so between periapsis and apoapsis ν runs ahead of M and E lies between them, as here (45° to 54.3° to 64.3°). r/a ranges from 1 − e at periapsis to 1 + e at apoapsis.
Common mistakes
- Mixing degrees and radians inside M = E − e sin E; the equation only holds in radians.
- Using plain atan instead of atan2 and getting ν in the wrong quadrant.
- Applying the equation to parabolic or hyperbolic paths (e ≥ 1), which need different forms.
Frequently asked questions
Why is Kepler's equation solved numerically?
It is transcendental: E appears both alone and inside a sine, so no finite algebraic formula isolates it. Iteration or series solutions are used instead.
How do I get the mean anomaly from time?
Use M = 360° × (t − T)/P, where T is the time of periapsis passage and P is the orbital period.
What is the difference between E and ν?
ν is the real angle seen from the focus (the Sun). E is measured from the centre of the auxiliary circle and is only a stepping stone in the calculation.
Sources: D. A. Vallado, Fundamentals of Astrodynamics and Applications, Microcosm Press · C. D. Murray and S. F. Dermott, Solar System Dynamics, Cambridge University Press