What Is the Equation of a Sphere?
A sphere is the set of all points in 3D space that are a fixed distance (the radius) from a single center point. Its standard form equation is \(\left(x - h\right)^2 + \left(y - k\right)^2 + \left(z - l\right)^2 = r^2\), where (h, k, l) is the center and r is the radius. This calculator builds that equation for you and also reports the sphere's diameter, surface area, and volume.
How to Use This Calculator
Enter the three coordinates of the center — h (x), k (y), and l (z) — then enter the radius r. The tool substitutes your values into the standard form and displays the completed equation along with \(r^2\) on the right-hand side. The center may use negative numbers; the equation will correctly show, for example, \(\left(x + 3\right)^2\) when h is −3.
The Formula Explained
The equation comes directly from the 3D distance formula. The distance between any point (x, y, z) on the sphere and the center (h, k, l) equals r. Squaring both sides of the distance equation removes the square root and gives the clean standard form. The radius r is always non-negative, and \(r^2\) is the constant on the right-hand side.
$$\left(x - h\right)^2 + \left(y - k\right)^2 + \left(z - l\right)^2 = r^2$$
Worked Example
Suppose a sphere is centered at (2, −1, 3) with radius 5. Substituting gives \(\left(x - 2\right)^2 + \left(y - \left(-1\right)\right)^2 + \left(z - 3\right)^2 = 5^2\), which simplifies to \(\left(x - 2\right)^2 + \left(y + 1\right)^2 + \left(z - 3\right)^2 = 25\). The diameter is 10, the surface area is \(4\pi\left(25\right) \approx 314.16\), and the volume is \(\frac{4}{3}\pi\left(125\right) \approx 523.60\).
FAQ
What if the center is at the origin? Then \(h = k = l = 0\) and the equation simplifies to \(x^2 + y^2 + z^2 = r^2\).
Can the radius be zero? A radius of 0 describes a single point (a degenerate sphere), not a true surface.
How is this different from a circle? A circle is 2D and uses two coordinates; a sphere is 3D and adds the z-term \(\left(z - l\right)^2\).