What This Converter Does
The Cartesian to Cylindrical Coordinates Converter transforms a point given in rectangular coordinates (x, y, z) into cylindrical coordinates (rho, theta, z). Cylindrical coordinates describe a 3D point by its radial distance from the z-axis (rho), the azimuthal angle around that axis (theta), and its height (z). This system is widely used in physics, engineering, and any problem with rotational symmetry about an axis, such as pipes, wires, and electromagnetic fields.
How to Use It
Enter the three Cartesian components x, y, and z. Choose whether you want the output angle theta expressed in degrees or radians. The converter returns rho (always non-negative), theta in your chosen unit, and z passed through unchanged.
The Formula Explained
The conversion uses these relations:
$$\rho = \sqrt{\text{x}^{2} + \text{y}^{2}}, \quad z = \text{z}$$ $$\theta = \operatorname{atan2}\!\left(\text{y},\ \text{x}\right) \cdot \frac{180}{\pi}$$ \(\rho = \sqrt{\text{x}^2 + \text{y}^2}\) is the distance from the z-axis to the point projected onto the xy-plane. \(\theta = \operatorname{atan2}(\text{y}, \text{x})\) is the angle from the positive x-axis. We use the two-argument atan2 function instead of plain arctan(y/x) so the correct quadrant is selected and the case x = 0 is handled without division by zero. The z-coordinate stays the same. When degrees are requested, the radian result is multiplied by \(\frac{180}{\pi}\).
Worked Example
For x = 3, y = 4, z = 5 with output in degrees: \(\rho = \sqrt{9 + 16} = \sqrt{25} = 5\). \(\theta = \operatorname{atan2}(4, 3) = 0.927295\ \text{rad} = 53.1301°\). z = 5. So the cylindrical point is (5, 53.1301°, 5). In radians, \(\theta = 0.927295\ \text{rad}\).
FAQ
What if x and y are both zero? Then \(\rho = 0\) and theta is mathematically undefined; by the atan2 convention the result is reported as 0.
Why might theta be negative? atan2 returns values in (-180°, 180°] (or \((-\pi, \pi]\)). To express theta in a 0–360° range, add 360° (or \(2\pi\)) to any negative result.
Does this change the z value? No. The z-coordinate is identical in both Cartesian and cylindrical systems.