Coordinate converter: Cartesian, polar, cylindrical and spherical
Convert Cartesian coordinates (x, y, z) to polar, cylindrical or spherical and back, with angles in degrees or radians and the point drawn on the axes.
The same point can be given in several ways. In Cartesian coordinates, by how far it goes along each axis (x, y, z). In polar coordinates, by how far away it is and in which direction, as on a radar or a lathe part. In cylindrical coordinates, as in polar plus the height, like a hole in a flange. In spherical coordinates, by the distance to the origin and two angles, like a point on Earth or the direction of an antenna. Robots, CNC machines, surveying and simulations switch between them all the time.
Cartesian and polar or cylindrical
ρ is the distance to the z axis (on the plane, to the origin) and φ the angle from the x axis, anticlockwise. z does not change. Example: (3, 4) → ρ = 5, φ = 53.13°. The atan2(y, x) function gives the angle in the right quadrant: with arctan(y/x), (3, 4) and (−3, −4) would give the same, and actually the second is at 233.13°.
Cartesian and spherical
r is the distance to the origin, θ the polar angle from the z axis (0 to 180°) and φ the azimuth, the same as in cylindrical. Example: (−3, −4, 5) → r = 7.07, θ = 45°, φ = 233.13°. On Earth, θ is the colatitude: latitude = 90° − θ, and φ the longitude.
Which letter is which angle
| Convention | Angle from the z axis | Azimuth on the xy plane |
|---|---|---|
| ISO 80000-2 (physics and engineering, this calculator) | θ | φ |
| Many maths books | φ | θ |
| Geography | latitude = 90° − θ | longitude |
Before copying a result, check which convention the program or book it goes to uses.
How to use the calculator
Choose the coordinates you have, type them and you get those of the other two systems. Angles accept degrees, radians and other units in their drop-down. For plane coordinates leave z at 0.
Frequently asked questions
How do you go from Cartesian to polar?
ρ = √(x² + y²) and φ = atan2(y, x). The point (3, 4) is at ρ = 5 and φ = 53.13°. Use atan2, not arctan(y/x): arctan cannot tell (3, 4) from (−3, −4), which is at 233.13°.
And from polar to Cartesian?
x = ρ cos φ, y = ρ sin φ. A point 10 units away at 30° is at (8.66, 5).
What are spherical coordinates?
They give a point by its distance to the origin r, the angle θ it makes with the z axis and the azimuth φ in the xy plane: x = r sin θ cos φ, y = r sin θ sin φ, z = r cos θ. They are those of latitude and longitude (latitude = 90° − θ).
Why do some people call the azimuth θ?
By custom: in many maths books θ is the azimuth and φ the polar angle. This calculator follows ISO 80000-2, used in physics and engineering: θ polar (from z) and φ azimuth (from x).
