3D Geometry Formulas

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

Reviewed by [email protected], 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

Skip the manual calculation

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

Use 3D Calculator See All Geometry Formulas