Math
Equation of a Sphere Calculator
Enter a sphere any way your problem gives it: center and radius, the expanded form x^2 + y^2 + z^2 + Ax + By + Cz + D = 0, the two endpoints of a diameter, or four points on the surface. mathcheck completes the square in all three variables with the work shown, converts between the standard and general forms, and reports the center, the exact radius (for example √21), the diameter, the surface area, and the volume.
Equations with zero or negative r^2 are flagged as a single point or as having no real graph.
Try an example
Result
Standard form
—
- General form
- —
- Center
- —
- Radius
- —
- Diameter
- —
- Surface area
- —
- Volume
- —
Student quick launch
Grade planning, algebra checks, and formulas students reach for most.
Study path
Use this calculator with
Follow these when you want the formula behind the answer, a short lesson, or nearby tools in the same topic.
The two forms of a sphere's equation
A sphere is the set of points at a fixed distance r from a center (h, k, l). Squaring the distance formula gives the standard form, and multiplying it out gives the general form. Going backwards, from general to standard, means completing the square three times, once in each variable.
x^2 + y^2 + z^2 - 2x + 4y - 6z - 11 = 0
Group and complete each square: (x^2 - 2x + 1) + (y^2 + 4y + 4) + (z^2 - 6z + 9) = 11 + 1 + 4 + 9, so (x - 1)^2 + (y + 2)^2 + (z - 3)^2 = 25. Center (1, -2, 3), radius 5.
| Value of r^2 after completing the square | Graph |
|---|---|
| positive | a sphere of radius sqrt(r^2) |
| zero | a single point (the would-be center) |
| negative | no real points |
How to use this calculator
- Choose how the sphere is given: center and radius, general form, diameter endpoints, or four points.
- Enter the values. In general-form mode, k is the shared The number multiplying a variable, like the 3 in 3x. of the squared terms (normally 1).
- Read the standard form in the header and the general form beneath it, then the center, exact radius, diameter, surface area, and volume.
- Open Show the work to see each completed square, the The point exactly halfway between two other points. and half-distance for a diameter, or the linear system for four points.
How to read the answer
The standard form shows the center and r^2 directly; remember that (x - h)^2 with h = -2 appears as (x + 2)^2. The radius is exact when r^2 is a perfect square or simplifies to a A root expression written with the √ symbol, such as a square root. such as 2√3, with the decimal beside it. Fractional centers are kept as fractions. If the general form produces r^2 ≤ 0 the calculator explains that the graph is a point or empty rather than inventing a radius.
Common mistakes and edge cases
- Halving the linear coefficient with the wrong sign: x^2 - 2x completes to (x - 1)^2, so the center coordinate is +1.
- Forgetting to add the three completed-square constants to the right side as well.
- Dividing by the leading coefficient for only some of the terms when k ≠ 1.
- Using the full diameter as the radius when the sphere is given by two endpoints.
- Expecting a sphere through four coplanar points; a circle passes through them, but no sphere does.
Worked examples
Center and radius
Center (1, -2, 3), r = 5
Standard form
(x - 1)^2 + (y + 2)^2 + (z - 3)^2 = 25
Complete the square
x^2 + y^2 + z^2 - 2x + 4y - 6z - 11 = 0
Standard form
(x - 1)^2 + (y + 2)^2 + (z - 3)^2 = 25
Fractional center
x^2 + y^2 + z^2 - x + 3y - 2 = 0
Standard form
(x - 1/2)^2 + (y + 3/2)^2 + z^2 = 9/2
Leading coefficient other than 1
2x^2 + 2y^2 + 2z^2 - 4x - 8 = 0
Standard form
(x - 1)^2 + y^2 + z^2 = 5
Degenerate: a single point
x^2 + y^2 + z^2 - 2x + 1 = 0
Standard form
—
No real graph
x^2 + y^2 + z^2 + 4 = 0
Standard form
—
From a diameter
Endpoints (1, 2, 3) and (3, 4, 5)
Standard form
(x - 2)^2 + (y - 3)^2 + (z - 4)^2 = 3
Through four points
(1, 0, 0), (0, 1, 0), (0, 0, 1), (-1, 0, 0)
Standard form
x^2 + y^2 + z^2 = 1
Coplanar points
Standard form
—
Zero radius
Standard form
—
Frequently asked questions
What is the equation of a sphere?+
(x - h)^2 + (y - k)^2 + (z - l)^2 = r^2, where (h, k, l) is the center and r the radius. It is the 3D version of the circle equation and comes straight from the distance formula.
How do I find the center and radius from the general form?+
Complete the square in x, y, and z. For x^2 + y^2 + z^2 + Ax + By + Cz + D = 0 the center is (-A/2, -B/2, -C/2) and r^2 = (A/2)^2 + (B/2)^2 + (C/2)^2 - D.
What if r^2 comes out negative or zero?+
Zero means the equation is satisfied by only one point, the center. Negative means no real point satisfies it. Neither is a sphere, and the calculator says so rather than reporting an imaginary radius.
How do I find the sphere with a given diameter?+
The center is the midpoint of the two endpoints and the radius is half the distance between them. For (1, 2, 3) and (3, 4, 5): center (2, 3, 4), distance sqrt(12) = 2√3, so r^2 = 3.
Can four points always determine a sphere?+
Only if they are not all in one plane (and no three are collinear). Substituting them into the general form gives a linear system; coplanar points make it singular.
How are surface area and volume related to the equation?+
Take r from the right side of the standard form and use 4πr^2 for surface area and (4/3)πr^3 for volume. The calculator lists both.
About this calculator
- Written by
- mathcheck editorial team
- Last reviewed
- September 4, 2026
Method
- Uses the values entered by the user and stable formulas documented on the page.
Related calculators
Equation of a Circle Calculator
Write a circle's equation in standard form (x − h)² + (y − k)² = r² and general form x² + y² + Dx + Ey + F = 0 from the center and radius, convert between forms by completing the square, or find the circle through three points.
Sphere Volume Calculator
Calculate sphere volume, surface area, and diameter from radius.
3D Distance Calculator
Find the distance between two points in 3D space with the exact radical form and decimal, plus the midpoint, the direction vector from P to Q, its unit vector, and direction angles.
Completing the Square Calculator
Complete the square on ax^2 + bx + c step by step: every algebraic line shown, exact fractions, vertex form a(x - h)^2 + k, the vertex, and the roots as simplified radicals.
Endpoint Calculator
Find the missing endpoint of a segment from one endpoint and the midpoint (or the midpoint from two endpoints), with the segment length, the line through the points, and steps.
Sphere Calculator
Enter one sphere measurement — radius, diameter, circumference, surface area, or volume — and get all five with exact π forms (36π), the great-circle area, steps, and liters or gallons of capacity.
Last updated: September 4, 2026