Convergence tolerance 1e-10, max 30 iterations. Newton iteration is quadratically convergent and usually reaches 10-digit accuracy in 3 to 5 steps.
Blue ellipse = orbit / Yellow disk = central body (focus) / White disk = satellite / Green line = focal distance r / Gray dashed = point on the auxiliary circle for E.
X = iteration n / Y = residual log10|f(E_n)|. Quadratic convergence almost doubles the digit count per step (tolerance line at 1e-10).
Kepler's equation gives the position of a body on an elliptical orbit as a function of time. The mean anomaly M is proportional to time, but it relates to the geometric eccentric anomaly E through a transcendental equation, so a numerical solution is required.
Kepler's equation and Newton iteration:
$$M = E - e\,\sin E,\qquad E_{n+1} = E_n - \frac{E_n - e\,\sin E_n - M}{1 - e\,\cos E_n}$$True anomaly v and focal distance r:
$$\tan\!\frac{\nu}{2} = \sqrt{\frac{1+e}{1-e}}\,\tan\!\frac{E}{2},\qquad r = a\,(1 - e\,\cos E)$$Orbital period from Kepler's third law (in solar-mass units):
$$T = 2\pi\sqrt{\frac{a^{3}}{G\,M_{c}}}\;\;\Longrightarrow\;\; T_{\mathrm{yr}} = \sqrt{\frac{a_{\mathrm{AU}}^{3}}{M_{c,\odot}}}$$Here $a$ is the semi-major axis [AU], $e$ the eccentricity (0 to 1), $M$ the mean anomaly [rad], $E$ the eccentric anomaly [rad], $\nu$ the true anomaly [rad], $M_c$ the central mass [solar mass], and $T$ the orbital period [yr].