Cylindrical Coordinates Calculator - (x, y, z) to (r, theta, z) and Back
Use this cylindrical coordinates calculator to convert any Cartesian, cylindrical, or spherical 3D point into the other two systems, returning r, theta, z, x, y, rho, and phi in degrees and radians.
Cylindrical Coordinates Calculator
Results
What Is the Cylindrical Coordinates Calculator?
A cylindrical coordinates calculator turns a 3D point written as (x, y, z), (r, theta, z), or (rho, phi, theta) into the same point in one of the other two systems. It applies the conversion pairs r = sqrt(x^2 + y^2), theta = atan2(y, x), x = r cos(theta), y = r sin(theta), rho = sqrt(r^2 + z^2), phi = atan2(r, z), r = rho sin(phi), and z = rho cos(phi).
- • Convert a Cartesian point to cylindrical form: Type (x, y, z) = (3, 4, 5) and read (r, theta, z) = (5, 53.13 deg, 5).
- • Convert a cylindrical point to Cartesian for code: Type (r, theta, z) = (5, 60 deg, 7) and read (x, y, z) = (2.5, 4.3301, 7).
- • Move from cylindrical to spherical for triple integrals: Type (r, theta, z) = (4, 53.13 deg, 3) and read (rho, phi, theta) = (5, 53.13 deg, 53.13 deg).
- • Recover cylindrical from a spherical measurement: Type (rho, phi, theta) = (5, 53.13 deg, 45 deg) and read (r, theta, z) = (4, 45 deg, 3).
Cartesian, cylindrical, and spherical coordinates are three different ruler sets for the same 3D space. The conversion is exact: (3, 4, 5) in Cartesian and (5, 53.13 deg, 5) in cylindrical describe the same position.
For a 2D problem on the xy-plane without a z height, Cartesian to Polar Calculator does the same conversion for the pair (x, y) to (r, theta) with no extra z input.
How the Cylindrical Coordinates Calculator Works
The calculator reads the chosen direction, treats the three input numbers as the source-system coordinates, and applies the matching trigonometric formulas. The result panel shows the same five values, and the labels switch to match the current direction.
- x, y, z: Cartesian coordinates. x and y set the radial distance and azimuthal angle; z is the height.
- r: Radial distance in the xy-plane, equal to sqrt(x^2 + y^2). Always non-negative.
- theta: Azimuthal angle in degrees and radians, measured counterclockwise from the positive x-axis. atan2 picks the correct quadrant.
- rho: Spherical radial distance from the origin, equal to sqrt(x^2 + y^2 + z^2). Always non-negative.
- phi: Spherical polar angle from the positive z-axis downward: 0 on the positive z-axis, 90 deg on the xy-plane, 180 deg on the negative z-axis.
The five result rows always have the same ids and precision, but their meaning switches with the direction selector. For cartesian-to-cylindrical the rows are the radial distance, theta in degrees, theta in radians, the input z echoed back, and the quadrant label. For cylindrical-to-cartesian the same rows become x, y, z, the input theta, and a reference label.
All three conversion pairs are exact, so the calculator does not introduce rounding beyond the four-decimal display precision in degrees and the six-decimal display precision in radians. The only place where the answer is symbolic is the origin and the z-axis, where theta is mathematically undefined.
Point (3, 4, 5) -> r = 5, theta = 53.13 deg, z = 5
x = 3, y = 4, z = 5
r = sqrt(3^2 + 4^2) = 5; theta = atan2(4, 3) = 53.13 deg; z = 5
r = 5, theta = 53.13 deg / 0.9273 rad (Quadrant I), z = 5
The 3-4-5 right triangle in the xy-plane with z = 5.
Cylindrical (5, 60 deg, 7) -> x = 2.5, y = 4.3301, z = 7
r = 5, theta = 60 deg, z = 7
x = 5 cos(60 deg) = 2.5; y = 5 sin(60 deg) = 4.3301; z = 7
x = 2.5, y = 4.3301, z = 7
Cylindrical becomes a Cartesian point for a 3D vector.
Spherical (5, 53.13 deg, 45 deg) -> r = 4, z = 3, theta = 45 deg
rho = 5, phi = 53.13 deg, theta = 45 deg
r = 5 sin(53.13 deg) = 4; z = 5 cos(53.13 deg) = 3; theta = 45 deg
r = 4, theta = 45 deg, z = 3
A point 5 units from the origin tilted 53.13 deg off the z-axis sits 4 out and 3 up.
According to Wolfram MathWorld, the conversion between Cartesian (x, y, z) and cylindrical (r, theta, z) uses x = r cos(theta), y = r sin(theta), r = sqrt(x^2 + y^2), and theta = atan2(y, x), with the z component unchanged in both directions
According to Wikipedia (Atan2), atan2(y, x) returns the angle whose tangent is y/x with the correct sign for all four quadrants, in the open interval (-pi, pi]
When the conversion is followed by a distance or norm calculation in 3D, 3D Distance Calculator computes the same sqrt(x^2 + y^2 + z^2) value from the same input triple.
Key Concepts Explained
Four ideas cover every cylindrical-coordinates conversion: the three coordinate systems, the azimuthal angle, the right-triangle interpretation of rho and phi, and how atan2 handles the four quadrants.
Three systems, one space
Cartesian (x, y, z), cylindrical (r, theta, z), and spherical (rho, phi, theta) label the same 3D point with different rulers. Cartesian uses three perpendicular distances, cylindrical uses a radius and an angle, and spherical uses a radial distance and two angles.
The azimuthal angle theta
theta is the angle in the xy-plane measured counterclockwise from the positive x-axis. It appears in cylindrical and spherical with the same convention.
The (r, z) right triangle
r in the xy-plane and z above it form a right triangle whose hypotenuse is the spherical radius rho. So phi = atan2(r, z) and rho = sqrt(r^2 + z^2).
Quadrant and axis handling with atan2
The two-argument arctangent atan2(y, x) returns the angle whose tangent is y/x in the correct quadrant, with a principal value in (-pi, pi].
These four ideas cover every conversion. Once you know that theta is the same in cylindrical and spherical, and that the (r, z) pair forms a right triangle with hypotenuse rho, every other conversion is just a rearrangement of the same formulas.
Since atan2 is the two-argument generalization of arctan, Arctan Calculator handles the single-argument case when the point sits on the x-axis or y-axis.
How to Use This Calculator
Five short steps take any 3D point from the source coordinate system to the destination system.
- 1 Pick the conversion direction: Open the Conversion direction menu and select the pair of systems.
- 2 Enter the three source coordinates: Type the three values for the source system. For Cartesian, type x, y, and z. For cylindrical, type r, theta in degrees, and z. For spherical, type rho, phi in degrees, and theta in degrees.
- 3 Read the destination coordinates: The result panel shows the destination coordinates with four decimals for distances and degrees, and six decimals for radians.
- 4 Switch angle units between degrees and radians: Both theta and phi are reported in degrees and radians at the same time.
- 5 Use the reference label to confirm the region: The bottom row names the quadrant, the axis, or the system label.
A satellite is 60 units from the origin on the xy-plane, 25 units above it, at azimuth 35 degrees. Set direction to Cylindrical to Spherical, enter x=60, y=25, z=35. The result reads rho=65, phi=67.38 degrees, and theta=35 degrees.
When the conversion is the first step before a norm or magnitude calculation, Vector Magnitude Calculator returns just sqrt(x^2 + y^2 + z^2) from the same three input values.
Benefits of Using This Calculator
The cylindrical coordinates calculator handles the three conversion pairs, the degree/radian output, and the indeterminate cases that usually trip up hand calculations.
- • All three systems in one place: Cartesian, cylindrical, and spherical conversions live in the same panel.
- • Both angle units in one result row: Degrees and radians appear in the same direction at the same time, so the value can be pasted into a degree-based or radian-based formula.
- • Atan2 picks the correct quadrant automatically: The two-argument arctangent handles every quadrant and the two axes.
- • Origin and z-axis handled explicitly: When the point is at the origin or on the z-axis, the azimuthal angle is mathematically undefined. The calculator reports 'Undefined' instead of a silent NaN.
- • Pairs with related 2D and 3D tools: The same r and theta feed into the cartesian to polar calculator, and the same x, y, z feed into the 3d distance calculator and the vector magnitude calculator.
Most undergraduate physics, engineering, and math courses use at least two of the three coordinate systems in the same problem set. Having one place to flip between them keeps the math right.
When the next step is a perpendicular vector or a parallelogram area, Cross Product Calculator takes two (x, y, z) triples and returns the cross product.
Factors That Affect Your Results
Three things change the answer you should expect, plus two practical caveats about how cylindrical coordinates are usually defined.
The signs of x and y
The signs of the two inputs decide the quadrant. (3, 4) and (-3, 4) share the same r, but theta jumps from 53.13 to 126.87 degrees.
Which angle unit the next step expects
Most math libraries expect radians in sin, cos, and atan2, while most textbooks expect degrees.
Whether the point is on the z-axis
When x = 0 and y = 0 the azimuthal theta is undefined. The calculator returns r = 0 and an explicit 'Undefined' label.
- • The cylindrical form of a non-origin point is not unique: (r, theta, z) and (r, theta + 360 deg, z) describe the same point. The calculator reports the principal value of theta in (-180 deg, 180 deg].
- • The phi in spherical coordinates is the polar angle from the positive z-axis, not the geographic latitude. If a problem uses latitude, the conversion is phi = 90 deg - latitude.
When the result feeds into a triple integral, the Jacobian in cylindrical coordinates is r and in spherical coordinates is rho^2 * sin(phi).
According to Wikipedia (Cylindrical coordinate system), the cylindrical system extends the polar system to 3D by adding a third z coordinate, and relates to spherical coordinates by rho = sqrt(r^2 + z^2) and phi = atan2(r, z)
When the surrounding problem also needs latitude and longitude or DMS notation, Coordinates Converter covers the geographic coordinate conversions that sit beside cylindrical and spherical.
Frequently Asked Questions
Q: How do you convert cylindrical to Cartesian coordinates?
A: Cylindrical (r, theta, z) becomes Cartesian with x = r cos(theta), y = r sin(theta), and z = z. The angle theta is taken in radians for cos and sin. When r = 0 the result is (0, 0, z) on the z-axis.
Q: How do you convert Cartesian (x, y, z) to cylindrical (r, theta, z)?
A: Cartesian (x, y, z) becomes cylindrical with r = sqrt(x^2 + y^2), theta = atan2(y, x), and z = z. The two-argument arctangent picks the correct quadrant, and the result lives in (-180 deg, 180 deg] in degrees. When x = 0 and y = 0 theta is undefined.
Q: What is the formula for cylindrical coordinates?
A: Cartesian to cylindrical uses r = sqrt(x^2 + y^2), theta = atan2(y, x), z = z. Cylindrical to Cartesian uses x = r cos(theta), y = r sin(theta), z = z. For the spherical extension, rho = sqrt(r^2 + z^2) and phi = atan2(r, z).
Q: How do you convert cylindrical to spherical coordinates?
A: Cylindrical (r, theta, z) becomes spherical (rho, phi, theta) with rho = sqrt(r^2 + z^2), phi = atan2(r, z), and theta = theta. The polar angle phi is measured from the positive z-axis, not the xy-plane.
Q: Are cylindrical coordinates unique?
A: r and z are unique for every non-origin point, but theta is unique only up to adding or subtracting 360 degrees. The calculator reports the principal value in (-180 deg, 180 deg] in degrees or (-pi, pi] in radians.
Q: What is theta in cylindrical coordinates?
A: theta is the azimuthal angle in the xy-plane, measured counterclockwise from the positive x-axis. It is the same theta that appears in spherical coordinates, so it carries over unchanged when moving between the two systems.