CalcWorldHub
Free online calculator · no signup

Orbital elements from Cartesian state vectors calculator

Recover eccentricity, orbital size, orientation, and true anomaly from a nonradial two-body position and velocity state.

4,000 tools
Orbital elements from Cartesian state vectors calculator — Inertial position xyz (km), Inertial velocity xyz (km/s), Central gravitational parameter (km^3/s^2) and calculation method
Orbital elements from Cartesian state vectors calculator: inputs and calculation method.

How to use this calculator

Recover eccentricity, orbital size, orientation, and true anomaly from a nonradial two-body position and velocity state.

  1. Enter Inertial position xyz (km), Inertial velocity xyz (km/s), Central gravitational parameter (km^3/s^2). Match the units shown beside each field and review the result together with the assumptions below.
  2. Read the worked example below to check the expected input format and result.
  3. Compare another scenario by changing one input at a time. Use Reset to return to the starting values.
Calculation guide

Orbital elements from Cartesian state vectors explained

Orbital eccentricity0.0709
Orbital eccentricity: 0.0708586175 in the worked scenario.

How the calculation works

h=r×v; evec=(v×h)/μ−r/|r|; energy=v²/2−μ/r; a=−μ/(2energy).

Angular momentum fixes the orbit plane, the eccentricity vector points toward periapsis, and the ascending-node vector references the inertial xy plane. Signed cross-and-dot products determine quadrants. Degenerate circular or equatorial angles are labeled undefined.

Set up the calculation

r — Inertial position xyz (km)
Three inertial position components in kilometres from the central body’s center. Use comma-separated values in the stated order.
v — Inertial velocity xyz (km/s)
Three inertial velocity components in km/s in the same reference frame as r. Use comma-separated values in the stated order.
mu — Central gravitational parameter (km^3/s^2)
Positive central-body parameter G times mass, in km³/s².

Limits of this model

Point-mass two-body dynamics in one consistent inertial frame. No reference-body collision check or perturbations. Radial states are excluded. Near-parabolic size and circular/equatorial orientation require limiting conventions.

Check this example

Inertial position xyz (km) = 7000,1000,2000; Inertial velocity xyz (km/s) = -1,7,1; Central gravitational parameter (km^3/s^2) = 398600.4418.

  • Orbital eccentricity: 0.0708586175
  • Semi-major axis: 6933.95436201 km
  • Inclination: 17.54840061 degrees
  • Ascending node longitude: 304.695154 degrees
  • Argument of periapsis: 274.864193 degrees
  • True anomaly: 149.647208 degrees
  • Specific orbital energy: -28.74264965 km^2/s^2

The three-dimensional state has nonzero z position and velocity, so inclination and node orientation must come from vectors rather than a planar vis-viva calculation alone.

Reading the outputs

Semi-major axis is negative for a hyperbolic state. Undefined periapsis angles in a circular orbit are geometric degeneracies, not calculation failures.

Frequently asked questions

Must position and velocity use the same frame?

Yes. Mixing Earth-fixed and inertial components gives invalid elements.

Why is true anomaly undefined for a circle?

There is no unique periapsis direction from which to measure it.

Are these osculating elements?

For a supplied perturbed state they describe the instantaneous matching two-body conic, without predicting perturbations.

How do I use the Orbital elements from Cartesian state vectors calculator?

Enter Inertial position xyz (km), Inertial velocity xyz (km/s), Central gravitational parameter (km^3/s^2). Match the units shown beside each field and review the result together with the assumptions below.

What is a worked example of Orbital elements from Cartesian state vectors?

Inertial position xyz (km) = 7000,1000,2000; Inertial velocity xyz (km/s) = -1,7,1; Central gravitational parameter (km^3/s^2) = 398600.4418. Orbital eccentricity: 0.0708586175 Semi-major axis: 6933.95436201 km Inclination: 17.54840061 degrees Ascending node longitude: 304.695154 degrees Argument of periapsis: 274.864193 degrees True anomaly: 149.647208 degrees Specific orbital energy: -28.74264965 km^2/s^2 The three-dimensional state has nonzero z position and velocity, so inclination and node orientation must come from vectors rather than a planar vis-viva calculation alone.