Skip to content
Cylinder VolumeFormula · πr²h
Units

Equation of a cylinder: Cartesian, parametric and cylindrical forms

The equation of a cylinder of radius r around the z-axis is x² + y² = r². Every point whose distance from the z-axis equals r satisfies it, at any height z. A shifted axis gives (x − a)² + (y − b)² = r², and in cylindrical coordinates the same surface is simply r = R.

Contents
  1. The Cartesian equation x² + y² = r²
  2. Cylinder with a shifted axis
  3. How to find the equation of a cylinder from given information
  4. Elliptical cylinder equation
  5. Parametric equations of a cylinder
  6. Cylindrical coordinates
  7. Volume from the equation: the triple integral
  8. Cylinders in the general sense: parabolic and hyperbolic
  9. Common mistakes
  10. Sources
  11. FAQ

A plane tilted 30° from a perpendicular cut meets the cylinder x² + y² = 9 (radius 3 in) in an ellipse with semi-axes 3 in and 3 ÷ cos 30° = 3.46 in. Its area is π × 3² ÷ cos 30° = 32.65 in².

The section tool above computes the area of the circle, ellipse or rectangle you get when a plane cuts a cylinder, the shapes the equations below describe.

The Cartesian equation x² + y² = r²

Take the z-axis as the axis of the cylinder. The distance from a point (x, y, z) to that axis is √(x² + y²). The cylinder of radius r is the set of points at exactly that distance, so √(x² + y²) = r, or after squaring:

x² + y² = r²

The variable z is missing on purpose. Whatever the height, the same circle condition holds, so the equation describes an infinite cylindrical surface. Add limits to get the solid you meet in geometry class:

What you describeEquation or inequalities
Infinite cylindrical surfacex² + y² = r²
Curved side of a finite cylinderx² + y² = r², 0 ≤ z ≤ h
Solid cylinder (inside included)x² + y² ≤ r², 0 ≤ z ≤ h
Points outside the cylinderx² + y² > r²

Example. Is the point (1.8, 2.4, 5) on the cylinder x² + y² = 9? Compute 1.8² + 2.4² = 3.24 + 5.76 = 9. Yes: it lies on the surface of radius 3, five units up. The point (1, 2, 0) gives 1 + 4 = 5 < 9, so it is inside.

The geometric picture behind these symbols, with the parts and types of cylinders, is on the page what is a cylinder.

Cylinder with a shifted axis

Move the axis so that it stays vertical but passes through the point (a, b) in the xy-plane. The distance to the axis becomes √((x − a)² + (y − b)²), and the equation is:

(x − a)² + (y − b)² = r²

Example 1. A cylinder of radius 4 whose axis passes through (2, −1): (x − 2)² + (y + 1)² = 16. Expanded, x² − 4x + 4 + y² + 2y + 1 = 16, that is x² + y² − 4x + 2y − 11 = 0. Check with the point (6, −1, 0): (6 − 2)² + 0² = 16. It is on the surface.

Example 2. Identify x² + y² − 6x + 8y = 0. Complete the squares: (x² − 6x + 9) + (y² + 8y + 16) = 9 + 16, so (x − 3)² + (y + 4)² = 25. It is a cylinder of radius 5 around the vertical line through (3, −4).

Axis parallel to the x-axis or the y-axis

The missing variable tells you the direction of the axis. Drop x and you get a cylinder along the x-axis; drop y and it runs along the y-axis.

AxisEquationFree variable
z-axisx² + y² = r²z
x-axisy² + z² = r²x
y-axisx² + z² = r²y
Parallel to z, through (a, b)(x − a)² + (y − b)² = r²z

A horizontal pipe lying along the x-axis with a radius of 0.5 m is y² + z² = 0.25. That is the setting of the horizontal cylinder volume problem, where a liquid level z = constant cuts the circle into a segment.

Axis in any direction

For an axis through a point P₀ with direction vector u, a point P is on the cylinder when its distance to that line equals r. Using the cross product, the equation is |(P − P₀) × u|² = r² |u|². Example: axis through the origin with direction u = (1, 1, 0), radius 2. The cross product (x, y, z) × (1, 1, 0) = (−z, z, x − y), so the equation is z² + z² + (x − y)² = 4 × 2, that is (x − y)² + 2z² = 8. The point (1, 1, 2), two units above the axis point (1, 1, 0), gives 0 + 8 = 8: it is on the surface.

How to find the equation of a cylinder from given information

Example (a). The axis is the vertical line through (1, −3) and the radius is 2. A vertical axis means z is missing, and the axis point gives a = 1, b = −3: (x − 1)² + (y + 3)² = 4. Expanded, x² − 2x + 1 + y² + 6y + 9 = 4, that is x² + y² − 2x + 6y + 6 = 0. Check with (3, −3, 0): (3 − 1)² + 0² = 4. It is on the surface.

Example (b). The axis is parallel to the z-axis through (2, 1), and the surface passes through (5, 5, 7). The radius is the distance from the point to the axis: r² = (5 − 2)² + (5 − 1)² = 9 + 16 = 25, so r = 5. The equation is (x − 2)² + (y − 1)² = 25. Check with (5, 5, 7): 9 + 16 = 25. The height 7 does not matter.

Example (c). The axis is the y-axis and the surface passes through (3, 10, 4). The missing variable is y, so the form is x² + z² = r². Then r² = 3² + 4² = 9 + 16 = 25 and the equation is x² + z² = 25 (radius 5). Check: 9 + 16 = 25. The y value 10 is ignored.

The same three steps work every time:

  1. Pick the axis direction. The variable along the axis is the one that does not appear in the equation.
  2. Write the distance from (x, y, z) to the axis using the other two variables, shifted by the axis point if needed.
  3. Set that distance squared equal to r². If r is not given, put the known surface point into it.

Elliptical cylinder equation

Replace the circle by an ellipse with semi-axes a (along x) and b (along y):

x²/a² + y²/b² = 1

With a = b = r it is the circular cylinder again. Any closed curve in the xy-plane can play the same role; a polygon gives a prism, the case discussed on the page is a cylinder a prism. Example: x²/16 + y²/9 = 1 has semi-axes 4 and 3. Each horizontal slice is an ellipse of area π × 4 × 3 = 37.70 square units, so a piece 10 units tall has a volume of 376.99 cubic units. Oval tanks follow this model; see the elliptical cylinder volume page for measurements in gallons and liters.

Parametric equations of a cylinder

A parametric form gives each point of the surface from two numbers, an angle θ around the axis and a height z:

x = r cos θ, y = r sin θ, z = z, with 0 ≤ θ < 2π and 0 ≤ z ≤ h

Substitute into the Cartesian equation: r² cos² θ + r² sin² θ = r², so every point produced lies on the cylinder. Example: with r = 2, θ = π/3 (60°) and z = 5, the point is (2 cos 60°, 2 sin 60°, 5) = (1, 1.732, 5). For the shifted axis, add the center: x = a + r cos θ, y = b + r sin θ. For the elliptical cylinder: x = a cos θ, y = b sin θ.

This form is the one used to draw a cylinder in graphing software and to compute surface integrals. The area element on the side is r dθ dz; integrating θ from 0 to 2π and z from 0 to h gives the lateral area 2πrh, the formula used for the lateral surface area of a cylinder.

Cylindrical coordinates

Cylindrical coordinates (r, θ, z) locate a point by its distance r from the z-axis, its angle θ measured from the positive x-axis, and its height z. They are polar coordinates in the plane plus a height.

DirectionFormulas
Cylindrical → Cartesianx = r cos θ, y = r sin θ, z = z
Cartesian → cylindricalr = √(x² + y²), θ = atan2(y, x), z = z

Examples. The point (3, 3, 2) has r = √18 = 4.243 and θ = 45° (π/4), so it is (4.243, π/4, 2). The point (−2, 2√3, 1) has r = √(4 + 12) = 4 and θ = 120° (2π/3); use atan2 or check the quadrant, since a plain arctan(y/x) would give −60°. In the other direction, (5, 60°, 2) becomes x = 2.5, y = 4.330, z = 2.

In these coordinates the cylinder of radius R around the z-axis is just r = R. The solid cylinder is 0 ≤ r ≤ R, 0 ≤ θ < 2π, 0 ≤ z ≤ h: three independent ranges, which is why integrals over cylinders are easiest in this system.

The same cylinder in spherical coordinates

Spherical coordinates (ρ, φ, θ) use x = ρ sin φ cos θ, y = ρ sin φ sin θ, z = ρ cos φ. Then x² + y² = ρ² sin² φ, so the cylinder x² + y² = R² becomes ρ sin φ = R, or ρ = R csc φ. Check: R = 3 and φ = 30° give ρ = 3 ÷ sin 30° = 6. The point has z = 6 cos 30° = 5.196 and distance to the axis 6 sin 30° = 3, as required. Cylindrical coordinates (r = R) stay simpler for this surface.

Volume from the equation: the triple integral

In cylindrical coordinates the volume element is dV = r dr dθ dz (the extra factor r comes from the change of variables). The volume of the solid cylinder of radius R and height h is:

V = ∫₀ʰ ∫₀²π ∫₀ᴿ r dr dθ dz = (R²/2) × 2π × h = πR²h

The inner integral gives R²/2, the angle contributes 2π and the height h. Imperial example: R = 3 in and h = 8 in give π × 9 × 8 = 226.19 in³. Metric example: R = 0.5 m and h = 2 m give π × 0.25 × 2 = 1.5708 m³, that is 1,570.8 L. Other proofs of the same result, with stacked disks and Cavalieri's principle, are in why the volume of a cylinder is πr²h, and the cylinder volume calculator applies it to any measurements.

Cylinders in the general sense: parabolic and hyperbolic

In multivariable calculus, any equation in which one variable is missing is a cylinder, also called a cylindrical surface. It is made of parallel lines (rulings) running along the axis of the missing variable, through a curve drawn in the other two. The curve does not have to be a circle.

EquationNameCross-sectionRulings parallel to
x² + y² = r²Circular cylinderCirclez-axis
x²/a² + y²/b² = 1Elliptic cylinderEllipsez-axis
z = x²Parabolic cylinderParabolay-axis
x²/a² − y²/b² = 1Hyperbolic cylinderHyperbolaz-axis

Common mistakes

  • Reading x² + y² = r² as a circle in a 3D problem. In space it is a cylinder; the circle needs a second equation, such as z = 0.
  • Forgetting to square the radius. A cylinder of radius 3 is x² + y² = 9, not x² + y² = 3.
  • Sign errors with a shifted axis. (x − 2)² + (y + 1)² = 16 has its axis through (2, −1), not (−2, 1).
  • Dropping the factor r in the integral. Without it, the triple integral gives 2πRh instead of πR²h.
  • Using arctan(y/x) without checking the quadrant. Points with x < 0 need 180° added; atan2 handles it.

Tip: in any quadric equation, look for the missing variable first. It gives the direction of the axis before you do any algebra.

Sources

FAQ

What is the equation of a cylinder?

A cylinder of radius r whose axis is the z-axis has the equation x² + y² = r². The variable z does not appear, so it can take any value: every point at distance r from the z-axis is on the surface. A finite cylinder of height h adds the condition 0 ≤ z ≤ h.

What is the equation of a cylinder with a shifted axis?

If the axis is parallel to the z-axis and passes through the point (a, b) of the xy-plane, the equation is (x − a)² + (y − b)² = r². For example, (x − 2)² + (y + 1)² = 16 is a cylinder of radius 4 around the vertical line through (2, −1).

What is the parametric equation of a cylinder?

x = r cos θ, y = r sin θ, z = z, with θ from 0 to 2π (2π excluded) and z from 0 to h for a finite cylinder. Each pair (θ, z) gives one point of the curved surface.

Why is x² + y² = r² a circle in 2D but a cylinder in 3D?

In the plane there are only x and y, so the equation picks out one circle. In space there is also z, and since the equation puts no condition on z, the circle is repeated at every height, which forms a cylinder.

What is the equation of a cylinder in cylindrical coordinates?

Simply r = R, where R is the radius: in cylindrical coordinates (r, θ, z), the cylinder is the set of points at constant distance R from the z-axis, whatever θ and z are.

How do you find the equation of a cylinder given its axis and a point?

Write the squared distance from a general point to the axis, then fix r with the known point. For a vertical axis through (2, 1) and a point (5, 5, 7) on the surface, r² = (5 − 2)² + (5 − 1)² = 25, so the equation is (x − 2)² + (y − 1)² = 25. The height 7 plays no role.

What is the equation of a cylinder in xyz form?

It depends on the axis. Axis along z: x² + y² = r². Axis along x: y² + z² = r². Axis along y: x² + z² = r². The variable that is missing is the direction of the axis.

Related

Updated November 2, 2026