Ampère's law
The magnetic field around a long straight wire or power cable depends on r alone. θ and z drop out.

This cylindrical coordinates calculator converts points between Cartesian (x, y, z), cylindrical (r, θ, z) and spherical coordinates, and rewrites whole equations such as x² + y² = 9 as r = 3. Every answer comes with exact values, steps and a 3D view.
Results
Your result, in 3D and step by step
For a point, the teal line is r, the orange arc is θ and the red line is the height z. For an equation, the view slices the surface at constant heights so its shape shows up as stacked rings.
Interactive diagram
3D point view
Result
Step-by-step solution
—Step by step
To use the cylindrical coordinates calculator, follow these 6 steps. The preview, the answer and the 3D view update as you type.
Choose the conversion
To cylindrical, To Cartesian, Spherical (both directions) or Equation.
Set the angle unit
Degrees or radians for angle inputs. A value with pi, such as 5pi/6, always counts as radians.
Pick the θ range
0° to 360° matches most calculus books; −180° to 180° matches atan2 in code.
Enter the values or the equation
Type numbers such as sqrt(3) or -2, or an equation such as z = x^2 + y^2.
Convert
Press Convert or Enter. Results refresh on their own while you type.
Read the answer and the steps
Check the result in all three systems, open the steps, and drag the 3D view.
Definition
Cylindrical coordinates are three numbers (r, θ, z) that locate a point in three-dimensional space by its distance from the z-axis, an angle around that axis and a height. They are polar coordinates in the xy plane with the Cartesian height z added on top.
The 3 cylindrical coordinates are:
Each coordinate held constant gives a coordinate surface. r = 5 is a circular cylinder of radius 5 around the z-axis, θ = π/3 is a half-plane hinged on the z-axis, and z = 2 is a horizontal plane. The 3 surfaces meet at right angles, which makes cylindrical coordinates an orthogonal coordinate system. That property keeps integration and the differential operators of physics short.
Cylindrical coordinates suit anything built around an axis: pipes, shafts, cables, lathe parts, coils and robot turntables. They are geometric coordinates, not latitude and longitude, so geographic locations need their own conversion first.
Green cylinder: r is fixed. Teal sheet: θ is fixed. Red sheet: z is fixed. The point sits where all 3 meet.
Cartesian, polar, cylindrical and spherical coordinates side by side
Cylindrical coordinates sit between polar and spherical coordinates: they keep the polar pair (r, θ) and borrow the height z from Cartesian coordinates.
| System | Coordinates | Dimensions | Surface for one fixed value | Volume element |
|---|---|---|---|---|
| Cartesian | (x, y, z) | 3D | plane x = c | |
| Polar | (r, θ) | 2D | circle r = c | |
| Cylindrical | (r, θ, z) | 3D | cylinder r = c | |
| Spherical | (ρ, θ, φ) | 3D | sphere ρ = c |
Where cylindrical coordinates are used
Cylindrical coordinates have 4 main uses in physics and engineering: electromagnetics, fluid flow, robotics and manufacturing.
Ampère's law
The magnetic field around a long straight wire or power cable depends on r alone. θ and z drop out.
Flow in a pipe
Laminar pipe flow has its fastest speed on the axis and zero speed at the wall r = R.
SCARA arms and turntables
A rotating base plus a vertical axis maps straight onto r, θ and z, so controllers store tool positions in cylindrical form.
Lathes and 3D printing
CNC lathes and rotary-axis printers cut or print by angle and radius; the controller converts back to Cartesian moves.
Formulas
The cylindrical coordinates formulas are 4 conversion pairs: Cartesian to cylindrical, cylindrical to Cartesian, cylindrical to spherical and spherical to cylindrical. z, or the shared azimuth θ, passes through each pair unchanged.
The dashed red ray is plain arctan(y/x). It agrees with θ only in Quadrants I and IV.
Why the two-argument arctangent
The two-argument arctangent atan2(y, x) reads the signs of x and y separately, so it lands in the correct quadrant. Plain arctan(y/x) sees only the ratio: (1, 1) and (−1, −1) both give y/x = 1 and arctan 45°, but the second point sits at 225°. hypot(x, y) is the matching function for r; it computes √(x² + y²) without overflow for very large values.
atan2 returns a principal value between −180° and 180° (−π and π). Add 360° (2π) to a negative result for the normalized angle between 0° and 360°. Both name the same direction, and the calculator's θ range switch picks either one.
| Where (x, y) is | Principal θ | Normalized θ |
|---|---|---|
| Quadrant I (x > 0, y > 0) | 0° to 90° | 0° to 90° |
| Quadrant II (x < 0, y > 0) | 90° to 180° | 90° to 180° |
| Quadrant III (x < 0, y < 0) | −180° to −90° | 180° to 270° |
| Quadrant IV (x > 0, y < 0) | −90° to 0° | 270° to 360° |
| Positive y-axis | 90° | 90° |
| Negative y-axis | −90° | 270° |
| On the z-axis (x = y = 0) | undefined | |
Volume element and triple integrals in cylindrical coordinates
The volume element in cylindrical coordinates is dV = r dr dθ dz. The scale factors are hr = 1, hθ = r and hz = 1: a turn of dθ sweeps an arc of length r dθ, so a small box gets wider the farther it sits from the axis.
A cylinder of radius 2 cm and height 5 cm gives the triple integral of r over 0 ≤ z ≤ 5, 0 ≤ r ≤ 2, 0 ≤ θ ≤ 2π: 20π ≈ 62.83 cm³ (62.83 mL, about 3.83 in³). For a cylindrical coordinates triple integral calculator, use the cylindrical mode of the Triple Integral Calculator; it adds the factor r for you.
The exact volume (r₂² − r₁²)Δθ Δz / 2 equals r Δr Δθ Δz when r is the middle radius. Without r, the error grows with distance from the axis.
Gradient, divergence, curl and Laplacian in cylindrical coordinates
The 4 differential operators in cylindrical coordinates follow from the scale factors 1, r and 1. They are the starting point for the heat equation in a rod, waves in a circular waveguide and Navier–Stokes pipe flow.
| Operator | Formula |
|---|---|
| Gradient | |
| Divergence | |
| Curl | |
| Laplacian |
Worked examples
Here are 6 cylindrical coordinates examples with solutions: 3 Cartesian to cylindrical, 1 cylindrical to Cartesian, 1 cylindrical to spherical and 1 equation. Each 3D view shows the point, and each button loads the problem into the calculator.
Example 1: Cartesian point P(−3, 4, 2)
Answer: (5, 126.8699°, 2), or θ ≈ 2.2143 rad. Plain arctan(4/−3) gives −53.13°, the wrong quadrant.
Example 2: (1, √3, 2) with exact values
Answer:
Example 3: (−1, −1, 3)
Answer: (√2, 225°, 3). The principal value is θ = −135°, the same direction.
Example 4: (r, θ, z) = (4, 120°, 3) to Cartesian
Answer:
Example 5: (2√3, 45°, 2) to spherical
Answer: (ρ, θ, φ) = (4, 45°, 60°).
Example 6: the equation z = x² + y²
Answer: , a paraboloid that does not depend on θ.
Case study: the magnetic field near a power cable
A transmission cable runs straight up the z-axis through a substation and carries 400 A. A sensor sits 0.30 m east and 0.40 m north of the cable, 2.5 m above the floor: Cartesian (0.30, 0.40, 2.5).
In cylindrical coordinates the sensor is at r = √(0.30² + 0.40²) = 0.50 m, θ = atan2(0.40, 0.30) ≈ 53.13° and z = 2.5 m. Ampère's law needs only r:
That is 160 μT, or 1.6 gauss. θ and z do not appear: the coordinate change shows the field depends on the distance from the cable alone.
Check a conversion with a second tool
9 other tools convert cylindrical coordinates. Wolfram Alpha converts plain-text input such as "(−3, 4, 2) to cylindrical coordinates". MATLAB uses [theta, r, z] = cart2pol(x, y, z), and Python uses numpy.hypot and numpy.arctan2; SymPy, Mathematica (CoordinateTransform), Maple and Mathcad handle it symbolically. GeoGebra and Desmos graph surfaces in cylindrical form.
Mathulate, published by Nexa Systems Inc. and last updated November 1, 2026, cites OpenStax Calculus Volume 3, section "Cylindrical and Spherical Coordinates". ZenQuery's Cylindrical Coordinate Converter plots the xy plane after you press "Convert & Plot". Compare decimals at one point: 126.8699° and 2.2143 rad are the same angle.
Avoid these
There are 8 common mistakes in cylindrical coordinate conversion. Each card pairs the mistake with its fix.
Plain arctan(y/x) for θ
Use atan2(y, x). arctan returns only −90° to 90°, so Quadrant II and III points land on the wrong side.
Degrees fed to radian functions
cos 60 in radians is −0.9524, not ½. Convert with θ·π/180 first.
Dropping r in triple integrals
dV = r dr dθ dz. Without r, the volume of a cylinder of radius 1 and height 1 comes out 2π instead of π.
Treating θ as unique
θ and θ + 360° name the same point; 420° equals 60°. Normalize before comparing answers.
Averaging angles as plain numbers
The mean of 350° and 10° is 0°, not 180°. Average the unit vectors (cos θ, sin θ) instead.
Expecting θ on the z-axis
At x = y = 0, r = 0 and θ is undefined: a mathematical singularity, not a bug.
Using a negative r
Keep r ≥ 0 and add 180° to θ. (−2, 30°, z) is the point (2, 210°, z).
Mixing cylindrical r with spherical ρ
r is the distance from the z-axis; ρ = √(r² + z²) is the distance from the origin.
Questions
In cylindrical coordinates, r is the distance from the z-axis, θ is the angle around the z-axis measured counterclockwise from the positive x-axis, and z is the height above the xy plane. The point (5, 126.87°, 2) lies 5 units from the axis, 126.87° around from +x and 2 units up.
To find θ in the correct quadrant, use atan2(y, x), or take the reference angle α = arctan|y/x| and place it by the signs of x and y: θ = α in Quadrant I, 180° − α in Quadrant II, 180° + α in Quadrant III and 360° − α in Quadrant IV. For (−3, 4), α = 53.13° and θ = 126.87°.
When x and y are both zero, r = 0 and θ is undefined: the point lies on the z-axis, where every angle names the same point. Most software reports θ = 0 by convention; this calculator marks the point as "on the z-axis: θ undefined". z still converts normally.
Yes, the height z can be negative, but the radius r is kept at r ≥ 0. z < 0 puts the point below the xy plane. r is a distance, so a negative r is rewritten as |r| with θ + 180°: (−2, 30°, z) is the point (2, 210°, z).
The volume element in cylindrical coordinates is dV = r dr dθ dz. The factor r is the Jacobian of the change from (r, θ, z) to (x, y, z): a turn of dθ sweeps an arc of length r dθ. A cylinder of radius R and height h gives ∫∫∫ r dz dr dθ = πR²h.
The difference between cylindrical and spherical coordinates is that cylindrical coordinates (r, θ, z) use a distance from the z-axis and a height, while spherical coordinates (ρ, θ, φ) use a distance from the origin and a second angle φ from the positive z-axis. Both share θ, and they connect through ρ = √(r² + z²), r = ρ sin φ and z = ρ cos φ. A cylinder is r = c; a sphere is ρ = c.
This cylindrical coordinates calculator converts Cartesian to cylindrical, cylindrical to Cartesian and cylindrical to spherical coordinates, finds θ in the correct quadrant with atan2, and rewrites equations, with exact values, steps and a 3D view.