Planet Position Calculator

ANALife Services AuthorityNational Calculator Authority›Planet Position Calculator

.calc-container { max-width: 640px; margin: 2rem 0; padding: 1.5rem; background: #fff; border: 1px solid #ddd; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); font-family: system-ui, -apple-system, sans-serif; } .calc-container h3 { font-family: Georgia, serif; font-size: 1.15rem; color: #1a1a1a; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--ac, #3d5a80); } .calc-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; flex-wrap: wrap; } .calc-row label { min-width: 160px; font-size: 0.9rem; color: #333; font-weight: 500; } .calc-row input[type="number"], .calc-row select { flex: 1; min-width: 120px; max-width: 200px; padding: 0.5rem 0.6rem; border: 1px solid #ccc; border-radius: 4px; font-size: 0.9rem; font-family: system-ui, sans-serif; color: #1a1a1a; background: #fafaf8; } .calc-row input:focus, .calc-row select:focus { outline: none; border-color: var(--ac, #3d5a80); box-shadow: 0 0 0 2px rgba(26,74,138,0.12); } .calc-row .unit { font-size: 0.82rem; color: #888; min-width: 30px; } .calc-btn { display: inline-block; margin-top: 0.5rem; padding: 0.55rem 1.5rem; background: var(--ac, #3d5a80); color: #fff; border: none; border-radius: 4px; font-size: 0.9rem; font-weight: 600; cursor: pointer; font-family: system-ui, sans-serif; } .calc-btn:hover { opacity: 0.9; } .calc-result { margin-top: 1.25rem; padding: 1rem 1.25rem; background: #f0f6fc; border-left: 3px solid var(--ac, #3d5a80); border-radius: 0 6px 6px 0; display: none; } .calc-result.visible { display: block; } .calc-result-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: #666; margin-bottom: 0.25rem; } .calc-result-value { font-size: 1.6rem; font-weight: 700; color: var(--ac, #3d5a80); } .calc-result-detail { font-size: 0.85rem; color: #555; margin-top: 0.5rem; line-height: 1.5; } .calc-note { margin-top: 1rem; font-size: 0.8rem; color: #888; font-style: italic; } .calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 0.75rem; } .calc-grid-item { padding: 0.6rem 0.8rem; background: #f8f9fa; border-radius: 4px; border: 1px solid #eee; } .calc-grid-item .label { font-size: 0.75rem; color: #888; text-transform: uppercase; letter-spacing: 0.04em; } .calc-grid-item .value { font-size: 1.1rem; font-weight: 600; color: #1a1a1a; } @media (max-width: 720px) { .calc-row { flex-direction: column; align-items: flex-start; gap: 0.3rem; } .calc-row label { min-width: auto; } .calc-row input[type="number"], .calc-row select { max-width: 100%; width: 100%; } .calc-grid { grid-template-columns: 1fr; } } .calc-chart { margin: 1rem 0; text-align: center; } .calc-chart svg { max-width: 100%; height: auto; } .calc-chart-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem 1.2rem; margin-top: 0.6rem; font-size: 0.8rem; color: #555; } .calc-chart-legend span { display: inline-flex; align-items: center; gap: 0.3rem; } .calc-chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; font-style: normal; } .calc-related { max-width: 640px; margin: 2rem 0 1rem; padding: 1.25rem 1.5rem; background: #f8f9fa; border: 1px solid #e8e8e8; border-radius: 8px; } .calc-related h3 { font-family: Georgia, serif; font-size: 1rem; color: #1a1a1a; margin: 0 0 0.75rem; padding-bottom: 0.4rem; border-bottom: 2px solid var(--ac, #3d5a80); } .calc-related-list { list-style: none; padding: 0; margin: 0 0 0.75rem; display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem 1.5rem; } .calc-related-list li a { font-size: 0.88rem; color: var(--ac, #3d5a80); text-decoration: none; } .calc-related-list li a:hover { text-decoration: underline; } .calc-browse-all { margin: 0.5rem 0 0; font-size: 0.9rem; font-weight: 600; } .calc-browse-all a { color: var(--ac, #3d5a80); text-decoration: none; } .calc-browse-all a:hover { text-decoration: underline; } @media (max-width: 720px) { .calc-related-list { grid-template-columns: 1fr; } }

Planet Position Calculator

Calculate the approximate heliocentric ecliptic longitude and distance of a solar system planet for a given date using simplified Keplerian orbital elements (J2000.0 epoch).

Planet

Mercury Venus Earth Mars Jupiter Saturn Uranus Neptune

Date (UTC)

Calculate Enter a date and select a planet to calculate its position.

// Keplerian orbital elements at J2000.0 epoch and their rates (per Julian century) // Source: NASA JPL "Keplerian Elements for Approximate Positions of the Major Planets" // https://ssd.jpl.nasa.gov/planets/approx_pos.html // Elements: [a0, adot, e0, edot, I0, Idot, L0, Ldot, lp0, lpdot, Om0, Omdot] // a = semi-major axis (AU), e = eccentricity, I = inclination (deg), // L = mean longitude (deg), lp = longitude of perihelion (deg), Om = longitude of ascending node (deg) const PLA_ELEMENTS = { mercury: [0.38709927, 0.00000037, 0.20563593, 0.00001906, 7.00497902, -0.00594749, 252.25032350, 149472.67411175, 77.45779628, 0.16047689, 48.33076593, -0.12534081], venus: [0.72333566, 0.00000390, 0.00677672, -0.00004107, 3.39467605, -0.00078890, 181.97909950, 58517.81538729, 131.60246718, 0.00268329, 76.67984255, -0.27769418], earth: [1.00000261, 0.00000562, 0.01671123, -0.00004392, -0.00001531, -0.01294668, 100.46457166, 35999.37244981, 102.93768193, 0.32327364, 0.0, 0.0], mars: [1.52371034, 0.00001847, 0.09339410, 0.00007882, 1.84969142, -0.00813131, -4.55343205, 19140.30268499, -23.94362959, 0.44441088, 49.55953891, -0.29257343], jupiter: [5.20288700, -0.00011607, 0.04838624, -0.00013253, 1.30439695, -0.00183714, 34.39644051, 3034.74612775, 14.72847983, 0.21252668, 100.47390909, 0.20469106], saturn: [9.53667594, -0.00125060, 0.05386179, -0.00050991, 2.48599187, 0.00193609, 49.95424423, 1222.49362201, 92.59887831, -0.41897216, 113.66242448, -0.28867794], uranus: [19.18916464, -0.00196176, 0.04725744, -0.00004397, 0.77263783, -0.00242939, 313.23810451, 428.48202785, 170.95427630, 0.40805281, 74.01692503, 0.04240589], neptune: [30.06992276, 0.00026291, 0.00859048, 0.00005105, 1.77004347, 0.00035372, -55.12002969, 218.45945325, 44.96476227, -0.32241464, 131.78422574, -0.00508664] };

function plaCalc() { const planet = document.getElementById('pla-planet').value; const dateStr = document.getElementById('pla-date').value; const resultDiv = document.getElementById('pla-result');

if (!dateStr) { resultDiv.innerHTML = 'Please select a valid date.'; return; }

const date = new Date(dateStr + 'T12:00:00Z'); if (isNaN(date.getTime())) { resultDiv.innerHTML = 'Invalid date.'; return; }

// Julian Date const JD = date.getTime() / 86400000.0 + 2440587.5;

// Julian centuries from J2000.0 const T = (JD - 2451545.0) / 36525.0;

const el = PLA_ELEMENTS[planet]; const a = el[0] + el[1] * T; // AU const e = el[2] + el[3] * T; const I = el[4] + el[5] * T; // deg const L = el[6] + el[7] * T; // deg const lp = el[8] + el[9] * T; // deg const Om = el[10] + el[11] * T; // deg

// Argument of perihelion const w = lp - Om;

// Mean anomaly (degrees), normalized to [-180, 180] let M = L - lp; M = M % 360; if (M > 180) M -= 360; if (M ' + '' + 'Julian Date' + JD.toFixed(2) + '' + 'T (Julian centuries from J2000)' + T.toFixed(6) + '' + 'Semi-major axis (a)' + a.toFixed(6) + ' AU' + 'Eccentricity (e)' + e.toFixed(6) + '' + 'Mean Anomaly (M)' + M.toFixed(4) + '°' + 'Eccentric Anomaly (E)' + (E * 180 / Math.PI).toFixed(4) + '°' + 'True Anomaly (ν)' + nu.toFixed(4) + '°' + 'Heliocentric Distance (r)' + r.toFixed(6) + ' AU (' + (r * 149597870.7).toFixed(0) + ' km)' + 'Ecliptic Longitude (λ)' + lon.toFixed(4) + '°' + 'Ecliptic Latitude (β)' + lat.toFixed(4) + '°' + 'Zodiac Position' + signDeg.toFixed(2) + '° ' + signs[signIdx] + '' + 'Light Travel Time from Sun' + lightMin.toFixed(2) + ' minutes' + ''; }

#### Formulas Used

1. Julian Date: JD = (Unix timestamp in days) + 2440587.5

2. Julian Centuries from J2000.0: T = (JD − 2451545.0) / 36525

3. Orbital Elements (linearly interpolated): a(T) = a₀ + ȧ·T  |  e(T) = e₀ + ė·T  |  I(T) = I₀ + İ·T L(T) = L₀ + L̇·T  |  ϖ(T) = ϖ₀ + ϖ̇·T  |  Ω(T) = Ω₀ + Ω̇·T

4. Argument of Perihelion: ω = ϖ − Ω

5. Mean Anomaly: M = L − ϖ   (normalized to [−180°, 180°])

6. Kepler's Equation (Newton-Raphson iteration): E − e·sin(E) = M ΔE = (M − E + e·sin(E)) / (1 − e·cos(E))   →   E ← E + ΔE   (until |ΔE| < 10⁻¹⁰)

7. Heliocentric Coordinates in Orbital Plane: x' = a·(cos E − e) y' = a·√(1 − e²)·sin E

8. Heliocentric Distance: r = √(x'² + y'²)

9. True Anomaly: ν = atan2(y', x')

10. Heliocentric Ecliptic Coordinates: xecl = r·[cos Ω·cos(ν+ω) − sin Ω·sin(ν+ω)·cos I] yecl = r·[sin Ω·cos(ν+ω) + cos Ω·sin(ν+ω)·cos I] zecl = r·sin(ν+ω)·sin I

11. Ecliptic Longitude & Latitude: λ = atan2(yecl, xecl)   (normalized to [0°, 360°]) β = arcsin(zecl / r)

#### Assumptions & References

More Calculators

References