Advertisement
Advertisement
EDUCATION

3D Coordinate Converter — Cartesian, cylindrical, spherical

Convert a point in three dimensions between rectangular, cylindrical and spherical coordinates, with every angle named in full so the convention is never in doubt.

Whichever you choose, all three representations are produced. Only the matching group of fields is read.
x — distance along the x axis.
y — distance along the y axis.
z — distance along the z axis.
Applies to angles you type in and to every angle reported back.
Angles rarely come out exact, so the display rounds. The underlying arithmetic is full precision.
Distance from the origin
0
 
0
Cylindrical radius (xy-plane)
0
Azimuth from the +x axis
0
Polar angle from the +z axis
0
Height above the xy-plane
All three forms:
Tip: the polar angle here is measured down from the +z axis, not up from the xy-plane. Elevation, the complement of it, is the convention used in astronomy and surveying, and mixing the two is the most common source of wrong answers.
Advertisement

The 3D coordinate converter above takes a point given in any one of the three standard systems — rectangular, cylindrical or spherical — and reports it in all three. Every angle is labelled by what it measures rather than by a Greek letter, because the letters are used inconsistently across fields and that inconsistency causes more errors than the arithmetic ever does.

Arb Digital publishes it because coordinate conversion is a place where a correct formula still produces a wrong answer. The two failure modes are the quadrant, where a naive arctangent silently loses half the plane, and the convention, where one textbook's polar angle is another's elevation. This tool handles the first properly and states the second in writing.

What This 3D Coordinate Converter Does

It converts in every direction between three systems. Cartesian coordinates locate a point by three perpendicular distances. Cylindrical coordinates replace the x and y pair with a distance from the z axis and an angle around it, keeping z as it was. Spherical coordinates replace all three with a single distance from the origin and two angles.

Alongside the converted values it reports the distance from the origin as the headline figure, the cylindrical radius, both angles and the height, so the relationships between the systems stay visible. The full triples appear in the panel underneath in a form you can copy straight into notes.

This page is specifically the three-dimensional case. Our polar coordinates converter handles the two-dimensional problem, moving a point between (x, y) and (r, θ) in the plane, and is the right tool when there is no third axis. Our coordinates converter is an entirely different job again: it converts geographic positions between decimal degrees, degrees-minutes-seconds and UTM grid references on the surface of the Earth, which involves a reference ellipsoid rather than the abstract axes used here.

How to Use It

  1. Choose the system you are starting from. The field hints change to name each value.
  2. Enter the three values. Angles use whichever unit is selected below them.
  3. Pick degrees or radians. The choice applies to input and output together.
  4. Read the headline for the distance from the origin, and the grid for the two angles and the cylindrical radius.
  5. Check the full triples in the panel underneath, which shows all three representations of the same point.

The Formulas and How They Are Calculated

Going from Cartesian to cylindrical, the radius is r = √(x² + y²), the azimuth is the angle of (x, y) in the plane, and z is unchanged. Coming back, x = r cos θ and y = r sin θ. Wolfram MathWorld's page on cylindrical coordinates sets out the same relations along with the volume element, which carries an extra factor of r.

Going from Cartesian to spherical, the radius is ρ = √(x² + y² + z²), the polar angle is arccos(z / ρ), and the azimuth is the same angle used in the cylindrical case. Coming back, x = ρ sin φ cos θ, y = ρ sin φ sin θ and z = ρ cos φ, with φ the polar angle measured from the +z axis.

Take the worked example the tool loads by default. The point (3, 4, 12) has a cylindrical radius of √(9 + 16) = 5 and a distance from the origin of √(9 + 16 + 144) = 13, both whole numbers because 3-4-5 and 5-12-13 are Pythagorean triples. The azimuth is arctan(4 / 3) = 53.13010 degrees, and the polar angle is arccos(12 / 13) = 22.61986 degrees. So the same point is (3, 4, 12) in Cartesian, (5, 53.13010°, 12) in cylindrical, and (13, 22.61986°, 53.13010°) in spherical.

Advertisement

The Convention Problem, Stated Plainly

There is no single agreed meaning for the symbols in spherical coordinates. In much of the mathematics literature θ is the azimuth and φ is the polar angle; in most of the physics literature the two are swapped, and swapped in the listed order as well. MathWorld's page on spherical coordinates tabulates the competing conventions across many references and warns that extreme care is needed when consulting the literature. That is not a small stylistic quibble — the same triple of numbers describes two different points depending on which convention the reader assumes.

This tool sidesteps the problem by refusing to rely on the symbols. Every field and every output is labelled by what it physically measures: the azimuth is the angle around the z axis measured from the +x axis, and the polar angle is measured down from the +z axis. Read those descriptions rather than any letter, and the answer transfers correctly into whichever notation your source uses.

One further variant is worth knowing because it is genuinely different rather than merely renamed. Astronomy, surveying and navigation usually use elevation, measured up from the reference plane, instead of the polar angle measured down from the axis. The two are complements: elevation equals ninety degrees minus the polar angle. A point on the horizon has zero elevation and a ninety degree polar angle. Feeding an elevation into a formula expecting a polar angle reflects the point through the plane, and because it still produces a plausible-looking result the error tends to survive review.

Why the Quadrant Matters More Than the Formula

The azimuth is often written as arctan(y / x), and taken literally that is wrong for half the plane. The ordinary arctangent returns a value between minus ninety and plus ninety degrees, so it cannot distinguish the point (−3, −4) from (3, 4): both give the same ratio, and both return the same angle.

The fix is the two-argument arctangent, which takes x and y separately and inspects their signs to place the result in the correct quadrant. This converter uses it throughout, then normalises the answer into the range zero to 360 degrees so the azimuth is always reported as a positive rotation. If your own calculation puts a point in the wrong half of the plane, the single-argument arctangent is almost always the reason.

Our trigonometric functions calculator is useful for checking individual sine, cosine and inverse values, and the angle converter handles degrees, radians and gradians if your source uses a different unit.

Degenerate Points Where the Angles Stop Meaning Anything

Two locations break the one-to-one correspondence between a point and its coordinates, and any converter that does not say so is hiding a real feature of the geometry.

The first is the origin. With a radius of zero, both angles are undefined: every direction leads to the same point, so no value is more correct than another. The convention is to report zero for both, and this tool does that while saying in the panel that the angles carry no information there.

The second is the z axis itself, where x and y are both zero but z is not. The cylindrical radius is zero, so the azimuth is undefined — the point is on the axis of rotation and turning around it changes nothing. The polar angle is still perfectly well defined, at zero degrees above and 180 degrees below. This is the same degeneracy that makes longitude meaningless at the poles, and it is why spherical coordinates need care in any numerical scheme that passes near the axis.

Choosing a System for the Problem

The systems are not interchangeable in practice, because each makes a different symmetry easy. Cartesian coordinates suit rectangular boxes, straight-line motion and anything defined by flat faces. Cylindrical coordinates suit pipes, rotating shafts, coils and any field with an axis of symmetry, because one coordinate then drops out of the problem entirely. Spherical coordinates suit point sources, planets, antenna radiation patterns and anything where distance from a centre is the natural variable.

Picking the system that matches the symmetry is usually the difference between an integral that separates and one that does not. That is the practical reason these conversions are taught early in vector calculus, and it is why our cylinder volume calculator and sphere volume calculator exist as separate pages: the shapes belong to different coordinate systems. For distances between two points in space our 3D distance calculator is the direct tool, and the vector calculator handles dot and cross products once the components are in Cartesian form.

Working with data where the convention is never written down?

Arb Digital builds analysis and reporting that documents its assumptions instead of burying them.

Browse All Free Tools Talk To Our Team

Common Mistakes to Avoid

  • Using a single-argument arctangent for the azimuth — it cannot tell opposite quadrants apart and silently reflects half the plane.
  • Assuming a convention from the Greek letters — mathematics and physics swap θ and φ, so read the description of what each angle measures.
  • Confusing polar angle with elevation — they are complements, and substituting one for the other reflects the point through the reference plane.
  • Mixing degrees and radians — every standard library trigonometric function works in radians, so a degree value passed straight in is wrong by a factor of about 57.
  • Ignoring the degenerate cases — at the origin both angles are undefined, and anywhere on the z axis the azimuth is.

Related Free Tools From Arb Digital

Handle the two-dimensional case with the polar coordinates converter, convert geographic positions with the coordinates converter, measure separations with the 3D distance calculator, work with components using the vector calculator, or switch angle units with the angle converter. The full free online tools hub lists every mathematics tool we publish.

Frequently Asked Questions

What is the difference between cylindrical and spherical coordinates?

Cylindrical coordinates keep the height z and replace x and y with a radius and an angle around the z axis. Spherical coordinates replace all three values with one distance from the origin and two angles.

Which angle is theta and which is phi?

It depends on the source. Mathematics texts usually make theta the azimuth and phi the polar angle, while physics texts commonly swap them. This tool labels every angle by what it measures rather than by a letter.

Is the polar angle the same as elevation?

No, they are complements. The polar angle is measured down from the positive z axis and elevation is measured up from the reference plane, so elevation equals ninety degrees minus the polar angle.

Why does my azimuth come out in the wrong quadrant?

Almost always because a single-argument arctangent was used. It cannot distinguish opposite quadrants, so the two-argument version that inspects the signs of x and y separately is required.

What happens at the origin?

Both angles become undefined, because every direction leads to the same point. The usual convention is to report zero for each, which is what this converter does while saying the values carry no information.

Does this convert latitude and longitude?

No. Geographic positions sit on a reference ellipsoid rather than on abstract axes, so they need a different conversion. Use our coordinates converter for decimal degrees, degrees-minutes-seconds and UTM.

Which system should I use for a given problem?

Match the symmetry. Rectangular shapes suit Cartesian, anything with an axis of rotation suits cylindrical, and anything measured outward from a centre suits spherical.

This page performs a standard mathematical conversion for educational purposes. Confirm which angle convention your own source or software uses before transferring values.

Advertisement
Advertisement

Take it further