Sphere Equation Calculator
Find the equation of a sphere in standard or expanded form from center and radius, diameter endpoints, or a surface point with volume and surface area.
What Is the Equation of a Sphere?
The equation of a sphere describes all points in 3D space that lie at a fixed distance $r$ (the radius) from a center $(h, k, l)$. It extends the familiar circle equation into three dimensions.
Sphere equations are used in multivariable calculus, computer graphics, physics, and engineering. See also our Sphere Calculator and Circle Equation Calculator.
Standard Form
$$(x - h)^2 + (y - k)^2 + (z - l)^2 = r^2$$
Here $(h, k, l)$ is the center and $r$ is the radius. When the center is at the origin, the equation simplifies to $x^2 + y^2 + z^2 = r^2$.
Expanded Form
Expanding and collecting terms gives:
$$x^2 + y^2 + z^2 + Ex + Fy + Gz + H = 0$$
Completing the square yields the center and radius:
$$h = -\\frac{E}{2}, \\quad k = -\\frac{F}{2}, \\quad l = -\\frac{G}{2}, \\quad r = \\sqrt{\\frac{E^2 + F^2 + G^2}{4} - H}$$
Example
A sphere with center $(3, 7, 5)$ and radius $10$ has equation $(x - 3)^2 + (y - 7)^2 + (z - 5)^2 = 100$.
Frequently Asked Questions
How do I find the sphere equation from diameter endpoints?
Find the center as the midpoint of the two endpoints, then compute the radius as half the distance between them. Substitute into the standard form.
What does a negative value under the square root mean?
If $E^2 + F^2 + G^2 - 4H < 0$ after completing the square, the equation does not represent a real sphere in 3D space.
How is a sphere equation related to the distance formula?
Every point $(x, y, z)$ on the sphere satisfies $\\sqrt{(x-h)^2 + (y-k)^2 + (z-l)^2} = r$. Squaring both sides gives the standard equation.
Can I get volume and surface area from the equation?
Yes. Once you know the radius, volume is $\\frac{4}{3}\\pi r^3$ and surface area is $4\\pi r^2$.