Cylindrical Coordinates Calculator

Cylindrical Coordinates Calculator

Emerging AI Skill PRO

Enter Calculation

For Cartesian → Cylindrical fill x, y, z. For Cylindrical → Cartesian fill r, θ (degrees), z.

Formula

r=x2+y2θ=atan2(y,x)z=z\begin{gathered} r = \sqrt{\text{x}^{2} + \text{y}^{2}} \\[0.6em] \theta = \operatorname{atan2}\!\left(\text{y},\ \text{x}\right) \\[0.6em] z = \text{z} \end{gathered}
Usage stats

Advertisement

Results

Converted Coordinates
(2.8284, 135°, 1)
(r, θ, z) cylindrical
x -2
y 2
z 1
r (radius) 2.828427
θ (degrees) 135°

Report an error on this page

What Are Cylindrical Coordinates?

Cylindrical coordinates describe a point in 3D space using a radius r, an angle θ, and a height z. They extend 2D polar coordinates by simply keeping the Cartesian z-axis. This system is ideal for problems with rotational symmetry around an axis — pipes, cylinders, electromagnetic fields, and fluid flow.

3D diagram showing a point defined by radius r, angle theta, and height z in cylindrical coordinates
A point P located by its radius r, azimuth angle θ, and height z above the xy-plane.

How to Use This Calculator

Pick a conversion direction. For Cartesian → Cylindrical, enter the x, y, and z values; the tool returns r, θ (in degrees), and z. For Cylindrical → Cartesian, enter r, θ (degrees), and z to get x, y, and z. The angle is computed with the two-argument arctangent (atan2) so the correct quadrant is always chosen.

The Formula Explained

The radius is the straight-line distance from the z-axis: $$r = \sqrt{x^{2} + y^{2}}$$ The angle uses $$\theta = \operatorname{atan2}(y,\ x)$$ which returns a value between −180° and 180°, handling all four quadrants and the axes correctly. The height \(z\) is identical in both systems. The inverse is $$x = r\cos\theta \qquad y = r\sin\theta$$

Advertisement
Top-down view showing conversion between Cartesian x, y and polar r, theta in the plane
Looking down the z-axis: r and θ relate to x and y through a right triangle.

Worked Example

Convert the Cartesian point (3, 4, 5). The radius is $$\sqrt{3^{2} + 4^{2}} = \sqrt{25} = 5$$ The angle is \(\operatorname{atan2}(4, 3) \approx 53.13°\). The height stays 5. So the cylindrical coordinates are (5, 53.13°, 5).

More Worked Examples: Other Quadrants and Reverse Conversion

The formulas used are \(r=\sqrt{x^2+y^2}\), \(\theta=\operatorname{atan2}(y,x)\), \(z=z\) for Cartesian to cylindrical, and \(x=r\cos\theta\), \(y=r\sin\theta\) for the reverse. The angle is given here in the range -180° to 180°. Using atan2 rather than a plain arctan(y/x) puts the angle in the correct quadrant.

Example 1: Cartesian (-2, 2, 1), second quadrant

  1. Radius: \(r=\sqrt{(-2)^2+2^2}=\sqrt{4+4}=\sqrt{8}=2\sqrt{2}\approx\) 2.828
  2. Angle: \(\theta=\operatorname{atan2}(2,-2)=135^\circ\). Since x < 0 and y > 0, the point is in quadrant II. A plain \(\arctan(2/-2)=-45^\circ\) would be wrong, because it lands in quadrant IV.
  3. Height: \(z=1\).

Result: \((r,\theta,z)=(2\sqrt{2},\,135^\circ,\,1)\).

Example 2: Cartesian (-3, -3, 4), third quadrant

  1. Radius: \(r=\sqrt{(-3)^2+(-3)^2}=\sqrt{9+9}=\sqrt{18}=3\sqrt{2}\approx 4.243\)
  2. Angle: \(\theta=\operatorname{atan2}(-3,-3)=-135^\circ\). Adding 360° gives the equivalent \(225^\circ\).
  3. Height: \(z=4\).

Result: \((r,\theta,z)\approx(4.243,\,-135^\circ,\,4)\), or equivalently \((4.243,\,225^\circ,\,4)\).

Example 3: Cylindrical (4, 120°, -2) to Cartesian

  1. x-coordinate: \(x=r\cos\theta=4\cos 120^\circ=4\cdot(-0.5)=-2\)
  2. y-coordinate: \(y=r\sin\theta=4\sin 120^\circ=4\cdot\frac{\sqrt{3}}{2}=2\sqrt{3}\approx 3.464\)
  3. Height: \(z=-2\).

Result: \((x,y,z)\approx(-2,\,3.464,\,-2)\). Check: \(\sqrt{(-2)^2+3.464^2}=\sqrt{4+12}=4=r\).

Common Angles and Quadrant Reference Table

For a point with radius r > 0, the Cartesian components are \(x=r\cos\theta\) and \(y=r\sin\theta\). The table gives the values per unit r.

θ (degrees) θ (radians) cos θ sin θ Sign of x Sign of y
0° 0 1 0 + 0
30° π/6 √3/2 ≈ 0.866 1/2 = 0.5 + +
45° π/4 √2/2 ≈ 0.707 √2/2 ≈ 0.707 + +
60° π/3 1/2 = 0.5 √3/2 ≈ 0.866 + +
90° π/2 0 1 0 +
120° 2π/3 -1/2 = -0.5 √3/2 ≈ 0.866 − +
135° 3π/4 -√2/2 ≈ -0.707 √2/2 ≈ 0.707 − +
180° π -1 0 − 0
-90° -π/2 0 -1 0 −
270° 3π/2 0 -1 0 −

Axis and origin cases

Cartesian condition θ from atan2(y, x)
x > 0, y = 0 0°
x = 0, y > 0 90°
x < 0, y = 0 180°
x = 0, y < 0 -90° (equivalently 270°)
x = 0, y = 0 (origin or any point on the z-axis) Undefined, since r = 0; by convention set to 0°

Angle ranges: atan2 returns values in -180° to 180°. To convert to the 0° to 360° range, add 360° to any negative angle (for example, -90° becomes 270°). To go back, subtract 360° from any angle above 180°. Both ranges describe the same direction.

Advertisement

Glossary of Terms and Conventions

r (radial distance)
The perpendicular distance from the point to the z-axis, \(r=\sqrt{x^2+y^2}\). By the usual convention r ≥ 0.
θ (azimuthal angle)
The angle measured counterclockwise from the positive x-axis to the projection of the point onto the xy-plane. Physics texts and ISO 80000-2 often call this angle φ instead of θ.
z (height or axial coordinate)
The signed distance from the xy-plane. It is identical to the Cartesian z.
z-axis
The line where x = 0 and y = 0. Every point on it has r = 0, and its angle θ is undefined.
xy-plane
The plane where z = 0. It contains the reference direction (the +x axis) from which θ is measured.
atan2(y, x)
A two-argument arctangent that uses the signs of both y and x to return the angle in the correct quadrant, normally in the range -180° to 180° (-π to π radians).

Cylindrical vs. spherical coordinates

Cylindrical coordinates (r, θ, z) use the distance from the z-axis, the azimuthal angle, and the height. Spherical coordinates use the distance ρ from the origin, a polar angle measured from the +z axis, and an azimuthal angle. Conventions differ between fields. In mathematics, θ is often the azimuth and φ the polar angle. In physics and ISO 80000-2, θ is the polar angle and φ the azimuth. Always check which convention a source uses.

Multiple representations

The same point can be written in many ways, because \((r,\theta,z)\) and \((r,\theta+360^\circ k,z)\) give the same location for any integer k. Some conventions also allow negative r, with \((-r,\theta+180^\circ,z)\) describing the same point, but this calculator uses r ≥ 0.

FAQ

Why use atan2 instead of arctan(y/x)? Plain arctan loses quadrant information and is undefined when x = 0. atan2 handles every case correctly.

Are angles in degrees or radians? This calculator displays and accepts θ in degrees for convenience; internally it converts to radians for the trig functions.

What if x and y are both zero? The point is on the z-axis, so r = 0 and θ is conventionally 0°.

Last updated:

Most popular in Math and Statistics

View all Math and Statistics calculators