On this page
You know the area of a circle, πr², and the volume of a sphere, (4/3)πr³. The same pattern continues in 4, 5 or 100 dimensions, and it does something surprising: the volume of the unit ball grows, peaks at dimension 5, and then shrinks towards zero. Here is the formula, the first five values, and two surprises.
What is the formula for the volume of an n-dimensional ball?
An n-ball of radius r is every point within distance r of a centre in n-dimensional space. The NIST Digital Library of Mathematical Functions, section 5.19 gives its volume as V = π^(n/2) rⁿ / Γ(n/2 + 1), where Γ is the gamma function. The same equation gives the surface as S = (n/r)V, which is the derivative of the volume with respect to r.
The gamma function stretches the factorial to non-whole numbers: Γ(n + 1) = n! and Γ(1/2) = √π, both from DLMF section 5.4. If that is new, our explainer on what the gamma function is and how it extends factorials is a good short detour.
Worked example: the first five unit balls
Set r = 1 and use Γ(x + 1) = xΓ(x) with Γ(1/2) = √π from DLMF 5.4:
n = 1: Γ(3/2) = √π/2, so V₁ = √π ÷ (√π/2) = 2. A "ball" in one dimension is the segment from −1 to 1.
n = 2: Γ(2) = 1, so V₂ = π. The unit disc.
n = 3: Γ(5/2) = (3/2)(1/2)√π = 3√π/4, so V₃ = π^(3/2) ÷ (3√π/4) = 4π/3. The familiar sphere.
n = 4: Γ(3) = 2! = 2, so V₄ = π²/2, about 4.935.
n = 5: Γ(7/2) = (5/2)(3/2)(1/2)√π = 15√π/8, so V₅ = π^(5/2) ÷ (15√π/8) = 8π²/15, about 5.264.
These match the table on Wikipedia's page on the volume of an n-ball, which also gives a shortcut with no gamma function at all: Vₙ = (2π/n) × Vₙ₋₂. Check it: V₃ = (2π/3) × 2 = 4π/3, and V₅ = (2π/5) × (4π/3) = 8π²/15.
Why does the volume peak at n = 5 and then shrink to zero?
The shortcut explains most of it. Going up two dimensions multiplies the volume by 2π/n. While n is below 2π (about 6.28) that factor is bigger than 1, so Vₙ beats Vₙ₋₂ up to n = 6; from n = 7 onwards it is smaller than 1, and every two-step move shrinks the volume further. Comparing neighbours settles the peak: V₆ ≈ 5.168 is already just below V₅ ≈ 5.264. The Wikipedia article states that the unit-ball volume increases for 0 ≤ n ≤ 5, reaches its maximum at n = 5, and tends to 0 as n goes to infinity.
The table shows the slide: 2.550 at n = 10 and 0.381 at n = 15. In the long run the factorial hidden in Γ(n/2 + 1) beats the power π^(n/2); Stirling's approximation for n! makes that race precise.
One honest caveat: the peak at 5 belongs to radius 1. The same article notes that which n gives the largest volume depends on the radius.
Why is almost all the volume near the surface?
Because DLMF 5.19 says volume scales as rⁿ, the inner ball of radius 0.99 holds 0.99ⁿ of the total. The outer 1% shell holds the rest:
n = 3: 0.99³ ≈ 0.970, so the shell holds about 3% of the volume.
n = 100: 0.99¹⁰⁰ ≈ 0.366, so the shell holds about 63%.
n = 1000: 0.99¹⁰⁰⁰ is below 0.0001, so the shell holds more than 99.99%.
In high dimensions a ball is almost all skin.
How does the ball compare with the cube?
Put the unit ball inside the cube from −1 to 1 in every direction, whose volume is 2ⁿ. Using the Wikipedia table, the ball fills π/4 ≈ 78.5% of the square in 2D and π/6 ≈ 52.4% of the cube in 3D, but in 10D only 2.550/1024, about 0.25%. The curse of dimensionality article puts it plainly: as the dimension grows, the hypersphere becomes an insignificant volume relative to the hypercube.
Where does the cube's volume go? Into the corners. The corner (1, 1, ..., 1) is at distance √n from the centre, so in 100 dimensions it is 10 units away while the ball reaches only 1. This is why nearest-neighbour searches and random sampling behave strangely on data with hundreds of features.
How to practise this
Derive V₂ by integrating circles and V₃ by stacking discs; our guide to integrals in polar, cylindrical and spherical coordinates shows the set-up.
Compute V₆ to V₁₀ with the two-step shortcut and plot them.
Work out the 1% shell fraction for n = 10 and n = 50.
If the gamma function or polar integrals are the sticking point, the Fermi Concept Library covers every concept in mathematics, each with its own lesson. To check your own working on a volume integral, the Fermi Problem Library has a step-by-step solver that explains the reasoning rather than printing an answer.



