3D Geometry Formulas

Solids + 3D coordinate geometry: direction cosines, lines, planes

Reviewed by Geometry Calculator, Geometry Calculator Developer & Online Math Educator Last updated May 14, 2026

3D geometry covers two related topics in standard school curricula: (1) solid shapes — volumes and surface areas of cube, cylinder, sphere, cone, pyramid, and prism; and (2) 3D coordinate geometry (NCERT Class 12 in India, A-level equivalent elsewhere) — direction cosines, lines and planes in 3-space. This page collects every formula you need for both, with worked examples.

The Formulas

Name Formula Notes
Cube — Volume V = s³ s = edge length. SA = 6s², diagonal d = s√3.
Rectangular Prism — Volume V = l × w × h SA = 2(lw + lh + wh); space diagonal d = √(l² + w² + h²).
Cylinder — Volume V = π × r² × h SA = 2πr(r + h); lateral SA = 2πrh.
Sphere — Volume V = (4/3) × π × r³ SA = 4πr². Only shape with one parameter.
Cone — Volume V = (1/3) × π × r² × h Exactly 1/3 of equivalent cylinder. Slant l = √(r²+h²); SA = πr(r + l).
Square Pyramid — Volume V = (1/3) × b² × h b = base side. 1/3 of cube with same base + height.
Distance in 3D d = √[(x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²] 3D Pythagorean theorem. Extension of the 2D distance formula.
Midpoint in 3D M = ((x₁+x₂)/2, (y₁+y₂)/2, (z₁+z₂)/2) Component-wise average — exactly the same idea as 2D.
Direction Cosines l = cos α, m = cos β, n = cos γ α, β, γ = angles a line makes with x-, y-, z-axes. Identity: l² + m² + n² = 1.
Direction Ratios → Direction Cosines l = a/√(a²+b²+c²), m = b/√(...), n = c/√(...) Normalize direction ratios (a,b,c) to get the unit vector (l,m,n).
Line — Vector Form ⃗r = ⃗a + λ⃗b ⃗a = position vector of a point on the line; ⃗b = direction vector; λ = parameter (any real).
Line — Cartesian (Symmetric) Form (x−x₁)/a = (y−y₁)/b = (z−z₁)/c (x₁,y₁,z₁) = point on line; (a,b,c) = direction ratios.
Plane — Vector Normal Form ⃗r · ⃗n = d ⃗n = normal vector; d = distance from origin.
Plane — Cartesian Form Ax + By + Cz + D = 0 (A, B, C) is the normal vector to the plane.
Plane — Intercept Form x/a + y/b + z/c = 1 a, b, c = x-, y-, z-intercepts of the plane.
Distance from Point to Plane d = |Ax₀ + By₀ + Cz₀ + D| / √(A² + B² + C²) Point (x₀, y₀, z₀); plane Ax+By+Cz+D=0. Pure 3D analog of point-to-line distance.
Angle Between Two Lines cos θ = |⃗b₁ · ⃗b₂| / (|⃗b₁| × |⃗b₂|) Dot product of direction vectors, normalized. θ ∈ [0°, 90°].
Angle Between Two Planes cos θ = |⃗n₁ · ⃗n₂| / (|⃗n₁| × |⃗n₂|) Dot product of normal vectors. Parallel planes → θ = 0; perpendicular → θ = 90°.
Skew Lines — Shortest Distance d = |(⃗a₂ − ⃗a₁) · (⃗b₁ × ⃗b₂)| / |⃗b₁ × ⃗b₂| Cross product gives common perpendicular direction; project the connecting vector onto it.

Worked Examples

Example 1: Volume of a cube with side 5 cm

  1. V = s³ = 5³ = 125 cm³
  2. SA = 6s² = 6 × 25 = 150 cm²
  3. Diagonal d = s√3 = 5√3 ≈ 8.66 cm

Example 2: Distance between (1, 2, 3) and (4, 6, 8)

  1. Δx = 3, Δy = 4, Δz = 5
  2. d = √(9 + 16 + 25) = √50 = 5√2 ≈ 7.07

Example 3: Direction cosines of line with direction ratios (2, 3, 6)

  1. Magnitude = √(4 + 9 + 36) = √49 = 7
  2. l = 2/7, m = 3/7, n = 6/7
  3. Check: l² + m² + n² = 4/49 + 9/49 + 36/49 = 49/49 = 1 ✓

Example 4: Distance from point (1, 2, 3) to plane 2x − y + 2z − 3 = 0

  1. Numerator: |2(1) − 1(2) + 2(3) − 3| = |2 − 2 + 6 − 3| = |3| = 3
  2. Denominator: √(4 + 1 + 4) = √9 = 3
  3. d = 3 / 3 = 1 unit

Frequently Asked Questions about 3D Geometry Formulas

What is the formula for volume of a sphere?

The volume of a sphere is determined by its radius. The standard Volume formula is V = (4/3)πr³. This calculation applies specifically to a perfect sphere where every point on the surface is equidistant from the center. It is distinct from other shapes like a cone or a cylinder, which have different geometric properties and corresponding mathematical expressions. Understanding this formula is essential for calculating the capacity of spherical tanks, planets, or balls in physics and engineering contexts.

How do I calculate surface area of a cylinder?

To find the total Surface area of a cylinder, you must account for both the lateral surface and the two circular bases. The formula is A = 2πr(r + h), where r is the radius and h is the height. This differs significantly from the surface area of a cube or a rectangular prism, which rely on square or rectangular faces. For a hemisphere, which is half a sphere, the calculation changes again, requiring only the curved surface area plus the base circle if it is included. Accurate measurement of these dimensions ensures precise results for material estimation in construction and manufacturing.

Can I get step-by-step solutions?

Yes, our tool provides detailed breakdowns of calculations. When you input dimensions for shapes such as a pyramid, frustum, or prism, the system displays each stage of the computation. This includes identifying the correct variables, substituting them into the relevant equation, and performing the arithmetic operations. This transparency helps students verify their own work and understand the underlying logic, rather than just receiving a final number. It is particularly useful for complex solids like a frustum of a cone, where multiple radii and heights are involved.

Is the calculator free to use?

Absolutely. The 3D geometry calculator is completely free for educational and professional use. There are no hidden fees, subscriptions, or limits on the number of calculations you can perform. Whether you are solving problems for a cube, a sphere, or a general polyhedron, access remains open. This resource supports learners studying Euler's formula, which relates the number of vertices, edges, and faces in convex polyhedra, without any cost barriers. It is designed to be accessible to everyone seeking accurate geometric computations.

How to Use Our 3D Geometry Formula Calculator

Navigating the calculator is straightforward and designed for efficiency. Follow these steps to compute dimensions for various three-dimensional objects accurately.

  1. Select a Shape: Begin by choosing the geometric solid you wish to analyze from the dropdown menu. Options include common forms such as a cube, sphere, cylinder, cone, and rectangular prism. More complex shapes like a pyramid, frustum, prism, or hemisphere are also available. Each selection automatically updates the required input fields to match the specific parameters of that shape, ensuring you enter the correct data types.
  2. Enter Dimensions: Input the necessary measurements into the designated fields. For a cylinder, you will need the radius and height. For a cone, specify the base radius and slant height or vertical height. If calculating for a rectangular prism, enter length, width, and height. Ensure all units are consistent before proceeding. The interface clearly labels each variable to prevent confusion between similar terms like radius versus diameter.
  3. Click Calculate: Once all fields are populated, press the calculate button. The system instantly processes the inputs using standard mathematical constants and formulas. Results for volume and surface area appear immediately below the input section. This rapid feedback loop allows for quick iterations when testing different values or verifying homework assignments.
  4. View Formulas and Visual Diagrams: After calculation, review the displayed formula used for your specific shape. This reinforces learning by connecting numerical results to algebraic expressions. Additionally, visual diagrams may appear to illustrate the selected solid, helping you identify which part corresponds to the entered radius, height, or edge lengths. This visual aid is particularly helpful for understanding abstract concepts like the apex of a pyramid or the curvature of a sphere.

Skip the manual calculation

Plug in your numbers and get instant step-by-step results.

Use 3D Calculator See All Geometry Formulas