N-Dimensional Sphere (Hypersphere) Volume and Surface Area
Compute the volume and surface area of an n-dimensional sphere (hypersphere) from the dimension n and radius r using the gamma function.
Input
Enter the dimension n and radius r to compute the volume and surface area of an n-dimensional sphere (hypersphere) using the gamma function.
Result
Volume
523.598776
Surface area
314.159265
Dimension n
3
Radius r
5
The length unit matches your input. The n-dimensional volume is in that unit to the power n, and the surface area to the power n minus 1.
How it works
- The volume is V=π^(n/2)/Γ(n/2+1)·r^n, where Γ is the gamma function, a generalization of the factorial to non-integer arguments.
- The surface area, the n−1 dimensional measure of the hypersphere boundary, is S=n·V/r. For n=2 the area is πr², and for n=3 the volume is (4/3)πr³.
- The gamma function is evaluated through a log-gamma approximation (Lanczos) and exponentiated, which avoids overflow and keeps results stable in high dimensions.
- Enter a dimension n that is a positive integer and a positive radius r. The length unit matches the input, and the n-dimensional volume is in that unit raised to the power n.
Reviews
Tell us what you think of this calculator.
Write a review
- Home
N-Dimensional Sphere (Hypersphere) Volume and Surface Area