Sphere Equation Calculator
Test cases replayed : 4 of 4 match · Methodology · No outside source listed
Enter a center and radius to get the general-form coefficients, or enter D, E, F and G to get the center and radius.
Result
Radius r (— if r² < 0: no real sphere)
Center x-coordinate h
- Center y-coordinate k
- Center z-coordinate l
- r² (right side of the standard form)
- D = −2h
- E = −2k
- F = −2l
- G = h² + k² + l² − r²
Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- You know: choose The center (h, k, l) and the radius r or The general form x² + y² + z² + Dx + Ey + Fz + G = 0.
- h (center x), or D: enter a number.
- k (center y), or E: enter a number.
- l (center z), or F: enter a number.
- r (radius), or G: enter a number.
- Read the result: Radius r (— if r² < 0: no real sphere); the panel also shows Center x-coordinate h, Center y-coordinate k, Center z-coordinate l, r² (right side of the standard form), D = −2h, E = −2k, F = −2l and G = h² + k² + l² − r².
How this calculator works
The standard equation of the sphere with center (h, k, l) and radius r is (x − h)² + (y − k)² + (z − l)² = r²: every point on it is at distance r from the center (the distance formula in three dimensions).
Expanding the squares gives the general form x² + y² + z² + Dx + Ey + Fz + G = 0 with D = −2h, E = −2k, F = −2l and G = h² + k² + l² − r².
Going back, complete the square in x, y and z: h = −D/2, k = −E/2, l = −F/2 and r² = h² + k² + l² − G. If r² is 0 the equation describes a single point; if it is negative, no real point satisfies it.
The formula
| Symbol | Meaning |
|---|---|
| You know (1: The center (h, k, l) and the radius r; 2: The general form x² + y² + z² + Dx + Ey + Fz + G = 0) | |
| h (center x), or D | |
| k (center y), or E | |
| l (center z), or F | |
| r (radius), or G | |
| Center x-coordinate h | |
| Center y-coordinate k | |
| Center z-coordinate l | |
| r² (right side of the standard form) | |
| Radius r (— if r² < 0: no real sphere) |
Worked example
| You know | The center (h, k, l) and the radius r |
|---|---|
| h (center x), or D | 1 |
| k (center y), or E | -2 |
| l (center z), or F | 3 |
| r (radius), or G | 4 |
| Center x-coordinate h | 1 |
|---|---|
| Center y-coordinate k | -2 |
| Center z-coordinate l | 3 |
| r² (right side of the standard form) | 16 |
| D = −2h | -2 |
| E = −2k | 4 |
| F = −2l | -6 |
| G = h² + k² + l² − r² | -2 |
Radius r (— if r² < 0: no real sphere) 4
Each step uses the unrounded value of the step before it; figures on this page are rounded for display.
Frequently asked questions
What is the general form of the sphere centered at (1, −2, 3) with radius 4?
x² + y² + z² − 2x + 4y − 6z − 2 = 0.
How do I find the center of x² + y² + z² − 4x + 6y − 2z − 11 = 0?
Halve and negate D, E and F: the center is (2, −3, 1), and r² = 4 + 9 + 1 + 11 = 25, so r = 5.
Does every equation of this form describe a sphere?
No. When h² + k² + l² − G is negative there is no real sphere, and the radius shows —.