Omni Calculator logo
Last updated:

Equation of a Sphere Calculator

New

Table of contents

What is the equation of a sphere?How to derive the equation of a sphereExpanded form of the sphere equationEquation of a sphere from the end-points of any diameterEquation of a sphere from its center and any known point on its surfaceHow to use this equation of a sphere calculator

Our equation of a sphere calculator will help you write the equation of a sphere in the standard form or expanded form if you know the center and radius of the sphere. Alternatively, you can find the sphere equation if you know its center and any point on its surface or if you know the end-points of any of its diameters. This calculator can also find the center and radius of a sphere from its equation.

Are you wondering what is the standard equation of a sphere or how to find the center and radius of a sphere using its equation? Have you perhaps come across a sphere equation that doesn't look like the general equation? Are you curious how knowing the diameter's end-points or the center and a point on the sphere can help you find the sphere's equation? Grab your favorite drink and keep reading this article; we'll tackle these questions together!

This calculator can also determine a sphere's surface area and volume from its equation. Want to calculate them without bothering with the sphere equation? Head to our sphere calc!

What is the equation of a sphere?

The equation of a sphere in the standard form is given by:

(xh)2+(yk)2+(zl)2=r2\scriptsize \quad (x-h)^2 + (y-k)^2 + (z-l)^2 = r^2

where:

  • (x,y,z)(x,y,z) – Coordinates of any point lying on the surface of the sphere;
  • (h,k,l)(h,k,l) – Coordinates of the center of the sphere; and
  • rrRadius of the sphere.
Sphere with center (h,k,l) and radius r. In this case, the sphere's center and co-ordinate origin coincide.
Sphere equation is a collection of all the points in 3-D space that lie equidistant from the center (h,k,l)(h,k,l). In this figure, the center and the origin coincide.

If we know the center and radius of the sphere, we can plug them into this standard form to obtain the equation of the sphere. For example, consider a sphere with a radius of 1010 and its center at (3,7,5)(3,7,5). By inserting this into the equation above, we get the standard equation of the sphere:

(x3)2+(y7)2+(z5)2=102=(x3)2+(y7)2+(z5)2=100\scriptsize \quad \begin{align*} (x-3)^2 + (y-7)^2 + (z-5)^2 &= 10^2\\ =(x-3)^2 + (y-7)^2 + (z-5)^2 &= 100 \end{align*}

Similarly, you can use the standard form of the sphere equation to find the radius and center of the sphere. For example, a sphere with the equation (x7)2+(y12)2+(z4)2=36(x-7)^2 + (y-12)^2 + (z-4)^2 = 36 would have its center at (7,12,4)(7,12,4), and its radius is given by:

r=36=6\qquad \begin{equation*} r = \sqrt{36}=6 \end{equation*}

❗ Note that you have to be careful regarding the signs of the center coordinates in the standard equation. If the sphere equation in the above example was instead (x7)2+(y+12)2+(z+4)2=36\small(x-7)^2 + (y+12)^2 + (z+4)^2 = 36, then its center would be (7,12,4)\small(7,-12,-4).

How to derive the equation of a sphere

Now that we know the standard equation of a sphere, let's learn how it came to be:

  1. First thing to understand is that the equation of a sphere represents all the points lying equidistant from a center point. In other words, any point that lies at a distance rr from a point (h,k,l)(h,k,l) lies on the sphere. Sound familiar? A circle equation works the same way! Go to our equation of a circle calculator and see if you can uncover more similarities!
  2. Consider a point S(x,y,z)S(x,y,z) that lies at a distance rr from the center (h,k,l)(h,k,l). Using distance formula, we get:
r=(xh)2+(yk)2+(zl)2\qquad \scriptsize \begin{align*} r &= \sqrt{(x-h)^2 + (y-k)^2 + (z-l)^2}\\ \end{align*}
  1. Squaring on both sides and rearranging this equation, we get:
((xh)2+(yk)2+(zl)2)2=(r)2(xh)2+(yk)2+(zl)2=r2\scriptsize \begin{align*} \left(\!\!\sqrt{(x-h)^2 + (y-k)^2 + (z-l)^2}\right)^2 &= (r)^2 \\ \implies (x-h)^2 + (y-k)^2 + (z-l)^2 &=r^2 \\ \end{align*}

And, voila! Just like that, we got the standard equation of a sphere! It bears repeating that every point SS that satisfies this equation lies on the surface of the sphere.

Expanded form of the sphere equation

Sometimes, you may come across a sphere equation that appears different from the standard form we've discussed so far. Generally, such equations should look like the following:

x2+y2+z2+Ex+Fy+Gz+H=0\scriptsize x^2+y^2+z^2+Ex+Fy+Gz+H = 0

where:

  • EE – Sum of all coefficients of the xx terms;
  • FF – Sum of all coefficients of the yy terms;
  • GG – Sum of all coefficients of the zz terms; and
  • HH – Sum of all constants terms.

This equation may seem intimidating at a glance, but if you take a closer look; it is simply the expanded version of the standard form we're used to. Let's use the completing the squares method to backtrack our way from the expanded version to the simpler, standard form:

  1. Rearrange the equation for clarity:
(x2+Ex)+(y2+Fy)+ (z2+Gz)+H=0\scriptsize \qquad (x^2+Ex) + (y^2+Fy) \\\qquad +\ (z^2+Gz)+H=0
  1. To write (x2+Ex)(x^2+Ex) in the (ab)2=a22ab+b2(a-b)^2 = a^2-2ab+b^2 format, we need to identify aa and bb. Clearly, a=xa=x. If 2ab=Ex-2ab = Ex, we get:
b=Ex2x=E2\scriptsize \qquad b = \frac{Ex}{-2x} = -\frac{E}{2}
  1. Adding and subtracting the quantity (E2)2\textcolor{red}{\left(- \frac{E}{2} \right)^2} to the equation, we get:
(x2(Ex)+E24)+(y2+Fy)+ (z2+Gz)+HE24=0(x(E2))2+(y2+Fy)+ (z2+Gz)+HE24=0\scriptsize \begin{align*} \left(x^2-(-Ex) \textcolor{red}{+\frac{E^2}{4}} \right) + (y^2+Fy)\\ +\ (z^2+Gz)+H\textcolor{red}{-\frac{E^2}{4}}&=0\\\\ \implies \left(x- \middle(-\frac{E}{2}\middle)\right)^2 + (y^2+Fy)\\ +\ (z^2+Gz)+H-\frac{E^2}{4}&=0 \end{align*}
  1. Similarly, we complete the squares for the y-terms and z-terms by adding and subtracting the quantities (F2)2\textcolor{red}{\left(- \frac{F}{2} \right)^2} and (G2)2\textcolor{red}{\left(- \frac{G}{2} \right)^2} to get:
 ⁣ ⁣(x(E2))2+(y2(Fy)+F24)+(z2(Gz)+G24)+ HE24F24G24=0(x(E2))2+(y(F2))2+(z(G2))2+ HE24F24G24=0\!\!\scriptsize \begin{align*} \left(x-\middle(-\frac{E}{2}\middle)\!\!\right)^2 \!+\! \left(y^2-(-Fy) \textcolor{red}{+ \frac{F^2}{4}} \right)\\ +\! \left(z^2-(-Gz) \textcolor{red}{+ \frac{G^2}{4}}\right)\\+\ H-\frac{E^2}{4} \textcolor{red}{-\frac{F^2}{4}-\frac{G^2}{4}}&=0\\\\ \implies\!\! \left(x-\middle(-\frac{E}{2}\middle)\!\!\right)^2 \!+ \!\left(y-\middle(-\frac{F}{2}\middle)\!\!\right)^2\\ + \left(z-\middle(-\frac{G}{2}\middle)\!\!\right)^2\\+\ H-\frac{E^2}{4} -\frac{F^2}{4}-\frac{G^2}{4}&=0 \end{align*}
  1. Rearrange the equation to group all the constant terms on the right-hand side:
(x(E2))2+(y(F2))2+(z(G2))2=E2+F2+G24H\scriptsize \begin{align*} \left(x-\middle(-\frac{E}{2}\middle)\!\!\right)^2 +\left(y-\middle(-\frac{F}{2}\middle)\!\!\right)^2 \\\\ + \left(z-\middle(-\frac{G}{2}\middle)\!\!\right)^2 = \frac{E^2+F^2+G^2}{4} -H \end{align*}
  1. Comparing this equation with the standard form of the sphere equation (xh)2+(yk)2+(zl)2)=r2:(x-h)^2 +(y-k)^2 + (z-l)^2) = r^2\text{:}
(x(E2)=h)2+(y(F2)=k)2+(z(G2)=l)2=E2+F2+G24H=r2\scriptsize\qquad \begin{align*} \left(x-\underbrace{\middle(-\frac{E}{2}\middle)}_{=h}\right)^2 + \left(y-\underbrace{\middle(-\frac{F}{2}\middle)}_{=k}\right)^2 \\\\ +\left(z-\underbrace{\middle(-\frac{G}{2}\middle)}_{=l}\right)^2 = \underbrace{\frac{E^2+F^2+G^2}{4} -H}_{=r^2} \end{align*}
  1. Extracting the center point and radius of the sphere from this equation, we get:
h=E2k=F2l=G2r2=E24+F24+G24Hor: r=E24+F24+G24H\scriptsize \qquad \begin{align*} h &= -\frac{E}{2}\\\\ k &= -\frac{F}{2}\\\\ l &= -\frac{G}{2}\\\\ r^2 &= \frac{E^2}{4} +\frac{F^2}{4}+\frac{G^2}{4}-H\\\\ \text{or: } r &= \sqrt{\frac{E^2}{4} +\frac{F^2}{4}+\frac{G^2}{4}-H} \end{align*}

Need help completing the squares? Our completing the square calculator will serve you.

In this sphere equation calculator, you can simply select the expanded form option as the type of the equation and enter the corresponding EE, FF, GG and HH values to obtain the equation in the standard form, its center and radius, and other relevant information.

Equation of a sphere from the end-points of any diameter

Now that you know what the equation of a sphere is, let's discuss how to obtain it in cases where you don't have the necessary parameters readily available. Suppose you only know the end-points of any one of the diameters of the sphere and have no information on the center point or radius. You still have a way to frame its equation.

If a diameter's end-points are known, we can figure out the equation of the sphere
Sphere's diameter AB, with endpoints A(x1,y1,z1)A(x_1,y_1,z_1) and B(x2,y2,z2)B(x_2,y_2,z_2).

Say the diameter ABAB of the sphere has the endpoints A(x1,y1,z1)A(x_1,y_1,z_1) and B(x2,y2,z2)B(x_2,y_2,z_2). Clearly, the center C(h,k,l)C(h,k,l) is given by the mid-point of ABAB, which is given by:

h=x1+x22k=y1+y22l=z1+z22\qquad \begin{align*} h = \frac{x_1+x_2}{2}\\\\ k = \frac{y_1+y_2}{2}\\\\ l = \frac{z_1+z_2}{2}\\\\ \end{align*}

Once we know the center, we can obtain the radius as the distance CACA or CBCB, through the distance formula:

r=(x1h)2+(y1k)2+(z1l)2\scriptsize \quad r = \sqrt{(x_1-h)^2 + (y_1-k)^2+ (z_1-l)^2}

We can then insert this center and radius in the standard sphere equation.

Equation of a sphere from its center and any known point on its surface

It is possible to deduce the equation of the sphere if we know its center and any point on its surface.
Sphere with center (h,k,l)(h,k,l) and a point P(px,py,pz)P(p_x,p_y,p_z) on its surface.

Similar to the case above, if we know the center (h,k,l)(h,k,l) and any point P(px,py,pz)P(p_x,p_y,p_z) on the sphere, we can use the distance formula to obtain the radius:

r=(pxh)2+(pyk)2+(pzl)2\scriptsize \quad r = \sqrt{(p_x-h)^2 + (p_y-k)^2+ (p_z-l)^2}

Again, we can directly plug in the values for the center and the radius in the standard equation of a sphere.

How to use this equation of a sphere calculator

You can use this equation of a sphere calculator to find the sphere equation or to find the center and radius of the sphere, depending on the variables you already know:

  • If you have the center and radius, directly enter them in the center coordinates and radius fields to get the sphere equation in the standard form and expanded form.

  • If you know the equation of the sphere in the standard form, choose the standard equation type from the Select equation field. Enter the hh, kk, and ll values in the corresponding fields, along with the remaining constant r2r^2 value in the RR field, to calculate the center and radius of the sphere.

  • If you know the equation of the sphere in the expanded form, choose the expanded equation type from the Select equation field. Enter the values for x-term coefficients in the EE field, for y-term coefficients in the FF field, for the z-term coefficients in the GG field, and the remaining constant term in the HH field to calculate the center and radius of the sphere.

  • If you know the endpoints of any diameter of the sphere, choose "Known endpoints of diameter AB" from the Select equation field and enter the endpoints to get the equation of the sphere along with its center and radius.

  • If you know the center and any point on the sphere, choose "Known point on the sphere P(px,py,pz)P(p_x,p_y,p_z)" from the Select equation field and enter the point coordinates and center coordinates to obtain the equation of the sphere and its radius.

  • Once you know the sphere's radius, obtaining other relevant properties such as area is straightforward. This calculator will evaluate the surface area and volume of the sphere for your convenience.

  • If you're having problems with the calculator, specifically if the tool ignores your inputs, try refreshing the calculator and enter values again in that specific calculator mode. You can do this by clicking on the circular reload icon at the very bottom of the tool.

(x-h)² + (y-k)² + (z-l)² = R

Center coordinates

Check out 46 similar coordinate geometry calculators 📈
Average rate of changeBilinear interpolationCatenary curve...43 more