Equation of a Sphere Calculator
Enter center coordinates and radius to get the sphere equation — or decode the general form to find center and radius.
🌐 What is the Equation of a Sphere?
The equation of a sphere in three-dimensional space describes the set of all points that are exactly a fixed distance (the radius) from a central point. In standard form, it is written as (x−h)² + (y−k)² + (z−l)² = r², where (h, k, l) is the center of the sphere and r is the radius. This is the three-dimensional generalisation of the circle equation (x−h)² + (y−k)² = r² in the plane.
The equation follows directly from the 3D distance formula. The distance from any point (x, y, z) on the sphere to the center (h, k, l) equals the square root of (x−h)² + (y−k)² + (z−l)². Setting this distance equal to r and squaring both sides gives the standard equation. A sphere centered at the origin simplifies to x² + y² + z² = r².
Spheres appear throughout science and engineering. In physics, the gravitational field of a spherical mass is governed by sphere geometry. In chemistry, atomic radii and electron cloud models use spherical symmetry. In computer graphics, sphere-ray intersection testing is a fundamental operation in ray tracing. In GPS and navigation, the position of a receiver on Earth is determined by the intersection of three spheres — one from each satellite — which is why this calculation is called trilateration.
This calculator handles two workflows. Find Equation mode takes the center and radius and produces the standard form equation, expanded general form, surface area 4πr², and volume (4/3)πr³. Decode mode takes the coefficients of the general form x²+y²+z²+Dx+Ey+Fz+G=0 and recovers the center and radius by completing the square.
📐 Formula
📖 How to Use This Calculator
Steps
💡 Example Calculations
Example 1: Sphere with center (3, 0, 0) and radius 5
Standard form from given center and radius
Example 2: Decode x² + y² + z² − 6x − 16 = 0
Extracting center and radius from general form
Example 3: Sphere centered at origin with radius 7
Special case h = k = l = 0
Example 4: Sphere with center (−2, 4, 1) and radius 3
Mixed-sign center coordinates
❓ Frequently Asked Questions
🔗 Related Calculators
What is the standard form of a sphere equation?
The standard form of a sphere equation is (x−h)² + (y−k)² + (z−l)² = r², where (h, k, l) is the center of the sphere and r is the radius. This equation states that every point (x, y, z) on the sphere is exactly r units away from the center. It is the 3D extension of the circle equation (x−h)² + (y−k)² = r² in two dimensions.
How do you find the equation of a sphere from center and radius?
Substitute the center coordinates and radius directly into the standard form. If the center is (h, k, l) and the radius is r, write (x−h)² + (y−k)² + (z−l)² = r². For example, center (3, 0, 0) and radius 5 gives (x−3)² + y² + z² = 25. This calculator does the substitution automatically and also shows the expanded general form.
What is the expanded (general) form of a sphere equation?
The expanded form is x² + y² + z² + Dx + Ey + Fz + G = 0, where D = −2h, E = −2k, F = −2l, and G = h²+k²+l²−r². It comes from expanding (x−h)² + (y−k)² + (z−l)² = r² and moving everything to one side. This form is useful in analytic geometry problems and when combining sphere equations algebraically.
How do you find the center and radius from the general form?
Complete the square on x, y, and z separately. For x²+Dx, add and subtract (D/2)²; for y²+Ey, add and subtract (E/2)²; for z²+Fz, add and subtract (F/2)². After completing the square, the equation becomes (x+D/2)²+(y+E/2)²+(z+F/2)² = (D²+E²+F²)/4 − G. The center is (−D/2, −E/2, −F/2) and the radius is √((D²+E²+F²)/4 − G).
What does it mean for r² to be negative in the general form?
If (D²+E²+F²)/4 − G ≤ 0, the equation does not describe a real sphere. When it equals zero, the equation represents a single point. When it is negative, there is no real geometric object. This calculator shows an error message in those cases, indicating that the entered coefficients are invalid for a sphere.
What is the surface area and volume of a sphere?
The surface area of a sphere with radius r equals 4πr². The volume equals (4/3)πr³. For a sphere with radius 5: surface area = 4π(25) ≈ 314.159 square units; volume = (4/3)π(125) ≈ 523.599 cubic units. Both formulas are classical results from integral calculus; this calculator computes them automatically from the given radius.
How is a sphere equation different from a circle equation?
A circle in 2D has equation (x−h)² + (y−k)² = r², involving two variables. A sphere in 3D has equation (x−h)² + (y−k)² + (z−l)² = r², involving three variables. The sphere is the natural 3D generalisation: it is the set of all points in space that are exactly r units from the center (h, k, l), just as the circle is the set of all points in a plane exactly r units from (h, k).
Can the center of a sphere have negative coordinates?
Yes. The center can be any point in 3D space, including points with negative coordinates. A sphere centered at (−2, −3, 4) with radius 6 has equation (x+2)² + (y+3)² + (z−4)² = 36. The sign conventions follow directly from the standard form: a negative h value becomes a plus sign inside the bracket.
How do you check if a point is inside, on, or outside a sphere?
Compute d² = (x−h)² + (y−k)² + (z−l)² for the point (x, y, z). If d² < r², the point is inside the sphere. If d² = r², the point is on the sphere. If d² > r², the point is outside the sphere. This is a direct application of the distance formula in 3D space.
What is the relationship between the general form coefficients and the center?
The coefficient D equals −2h, E equals −2k, and F equals −2l. Therefore the center coordinates are h = −D/2, k = −E/2, l = −F/2. The constant G equals h²+k²+l²−r², so r² = h²+k²+l²−G. This mapping makes it straightforward to convert between standard form and general form in either direction.
What is the diameter of a sphere and how is it related to radius?
The diameter of a sphere is the longest straight-line distance through the center, equal to twice the radius: d = 2r. For a sphere with radius 5, the diameter is 10. The diameter is the maximum chord length of the sphere. In the sphere equation (x−h)²+(y−k)²+(z−l)²=r², only the radius (not the diameter) appears explicitly.