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.

🌐 Equation of a Sphere Calculator

Enter center and radius to get the sphere equation, or switch to Decode to find center and radius from the general form.

−1010
−1010
−1010
0.120

Enter D, E, F, G from   x² + y² + z² + Dx + Ey + Fz + G = 0

Standard Equation
Center (h, k, l)
Radius (r)
Diameter
Surface Area (4πr²)
Volume (⅓πr³ × 4)
Center (h, k, l)
Radius (r)
Diameter
Surface Area
Volume

🌐 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

(x − h)² + (y − k)² + (z − l)² = r²
(h, k, l) = center of the sphere in 3D space
r = radius (distance from center to surface)
Expanded form: x² + y² + z² + Dx + Ey + Fz + G = 0
where D = −2h, E = −2k, F = −2l, G = h²+k²+l²−r²
Decoding: h = −D/2, k = −E/2, l = −F/2, r = √((D²+E²+F²)/4 − G)
Surface area: A = 4πr²
Volume: V = (4/3)πr³
Example: center (3, 0, 0), radius 5 → (x−3)² + y² + z² = 25

📖 How to Use This Calculator

Steps

1
Choose a mode: Find Equation if you know center and radius; Decode Form if you have the general equation coefficients.
2
Find Equation: enter h, k, l (center x, y, z coordinates) and r (radius). Adjust sliders for values in −10 to 10, or type any number directly.
3
Decode Form: enter D, E, F, G from x²+y²+z²+Dx+Ey+Fz+G=0. If r² comes out ≤ 0, the coefficients do not represent a valid sphere.
4
Read the results: the Standard Equation shows (x−h)²+(y−k)²+(z−l)²=r² with substituted values. The note below the grid shows the equivalent expanded general form.

💡 Example Calculations

Example 1: Sphere with center (3, 0, 0) and radius 5

Standard form from given center and radius

1
h = 3, k = 0, l = 0, r = 5. Substitute: (x−3)² + (y−0)² + (z−0)² = 5².
2
Simplified: (x−3)² + y² + z² = 25.
3
Expanded form: D = −6, E = 0, F = 0, G = 9−25 = −16 → x²+y²+z²−6x−16 = 0.
4
Surface area = 4π(25) ≈ 314.159; Volume = (4/3)π(125) ≈ 523.599.
Equation: (x−3)² + y² + z² = 25
Try this example →

Example 2: Decode x² + y² + z² − 6x − 16 = 0

Extracting center and radius from general form

1
D = −6, E = 0, F = 0, G = −16. Center: h = −D/2 = 3, k = 0, l = 0.
2
r² = (D²+E²+F²)/4 − G = (36)/4 − (−16) = 9 + 16 = 25.
3
r = √25 = 5. Standard form: (x−3)² + y² + z² = 25.
Center: (3, 0, 0), Radius: 5

Example 3: Sphere centered at origin with radius 7

Special case h = k = l = 0

1
Center (0, 0, 0), r = 7. Equation: x² + y² + z² = 49.
2
Surface area = 4π(49) ≈ 615.752 square units.
3
Volume = (4/3)π(343) ≈ 1436.755 cubic units.
Equation: x² + y² + z² = 49
Try this example →

Example 4: Sphere with center (−2, 4, 1) and radius 3

Mixed-sign center coordinates

1
h = −2, k = 4, l = 1, r = 3. Standard form: (x+2)² + (y−4)² + (z−1)² = 9.
2
D = 4, E = −8, F = −2, G = 4+16+1−9 = 12. Expanded: x²+y²+z²+4x−8y−2z+12 = 0.
3
Surface area = 4π(9) ≈ 113.097. Volume = (4/3)π(27) ≈ 113.097.
Equation: (x+2)² + (y−4)² + (z−1)² = 9
Try this example →

❓ Frequently Asked Questions

What is the standard form of a sphere equation?+
The standard form is (x−h)² + (y−k)² + (z−l)² = r², where (h, k, l) is the center and r is the radius. It expresses that every point (x, y, z) on the sphere is exactly r units from the center, which follows directly from the 3D distance formula. This form makes it easy to read off the center and radius by inspection.
How do you find the equation of a sphere from center and radius?+
Substitute the center coordinates (h, k, l) and radius r into the standard form: write (x−h)² + (y−k)² + (z−l)² = r². For a sphere with center (2, −1, 3) and radius 4, the equation is (x−2)² + (y+1)² + (z−3)² = 16. No additional computation is needed beyond this substitution.
How do you decode the general form to find center and radius?+
Complete the square on each variable. For x² + Dx, add (D/2)² to both sides; same for y² + Ey and z² + Fz. The resulting equation (x + D/2)² + (y + E/2)² + (z + F/2)² = (D²+E²+F²)/4 − G reveals the center (−D/2, −E/2, −F/2) and radius √((D²+E²+F²)/4 − G). This calculator does all three completing-the-square steps simultaneously.
What does the expanded form x²+y²+z²+Dx+Ey+Fz+G=0 represent?+
It is the standard form equation expanded and rearranged with everything on one side. The coefficients are D = −2h, E = −2k, F = −2l, and G = h²+k²+l²−r². Expanded form is used in analytic geometry when manipulating multiple sphere equations algebraically, such as finding the intersection of two spheres, which is always a circle or a point.
What is the surface area formula for a sphere?+
The surface area of a sphere with radius r equals 4πr². This famous formula was proved by Archimedes: the surface area of a sphere equals four times the area of a great circle. For radius 5, surface area = 4π(25) ≈ 314.159 square units. Doubling the radius quadruples the surface area because the formula grows as r².
What is the volume formula for a sphere?+
The volume of a sphere with radius r equals (4/3)πr³. For radius 5, volume = (4/3)π(125) ≈ 523.599 cubic units. Doubling the radius multiplies the volume by 8 because the formula grows as r³. Archimedes also proved this: the volume of a sphere is two-thirds the volume of the smallest cylinder that contains it.
How is a sphere equation used in GPS technology?+
Each GPS satellite broadcasts a signal with a time stamp. The receiver measures the time delay and computes the distance to the satellite. Every point at that distance from that satellite lies on a sphere centered at the satellite. With signals from three satellites, the receiver's position is the intersection of three spheres, which is at most two points. A fourth satellite disambiguates and confirms the solution. This process is called trilateration.
What happens when r² equals zero in the general form?+
When (D²+E²+F²)/4 − G = 0, the equation represents a single point rather than a sphere. The only solution is x = −D/2, y = −E/2, z = −F/2. This is sometimes called a degenerate sphere or a point sphere. When r² is negative, there is no real solution, and the equation has no geometric interpretation over the real numbers.
How do you write the equation when the center is at the origin?+
When h = k = l = 0, the standard form simplifies to x² + y² + z² = r². For example, a sphere of radius 6 centered at the origin has equation x² + y² + z² = 36. There are no subtracted constants, making this the simplest possible sphere equation. Any point (x, y, z) on this sphere satisfies x² + y² + z² = 36, which means its distance from the origin is exactly 6.
What is the intersection of a sphere with a plane?+
The intersection of a sphere with a plane is a circle (or a point if the plane is tangent, or empty if the plane misses the sphere). If the plane passes through the center, the cross-section is called a great circle and has the same radius as the sphere. Smaller cross-sections (minor circles) occur when the plane cuts closer to the edge. This property is used in spherical geometry and navigation along great circle routes.
How do you check if a point lies on a sphere?+
Substitute the point coordinates into the left side of the standard form equation. If the result equals r², the point is on the sphere. For the sphere (x−3)² + y² + z² = 25, check if point (3, 0, 5) lies on it: (3−3)² + 0² + 5² = 0 + 0 + 25 = 25 = r². Yes, it does. For (0, 0, 0): (0−3)² + 0 + 0 = 9 ≠ 25, so the origin is inside the sphere (distance from center is 3, less than radius 5).