Equation of a Sphere Calculator

Choose how the sphere is given and enter it to get its equation.

Write the three coordinates, like (1, 2, 3).

Write the three coordinates, like (1, 2, 3).

Try

Result

You enteredsphere with diameter from (0,0,0) to (2,0,0)\text{sphere with diameter from } \left(0, 0, 0\right) \text{ to } \left(2, 0, 0\right)

(x−1)2+y2+z2=1\displaystyle \left(x - 1\right)^{2} + y^{2} + z^{2} = 1

Centre and radius

Centre (1,0,0), radius 1\displaystyle \text{Centre } \left(1, 0, 0\right)\text{, radius } 1

General form

x2+y2+z2−2x=0\displaystyle x^{2} + y^{2} + z^{2} - 2x = 0
Show the work
  1. Midpoint of the diameter

    The centre of a sphere is the midpoint of any diameter. Average the matching coordinates of the two end points.

    Using C=(x1+x22, y1+y22, z1+z22)C = \left(\frac{x_1 + x_2}{2},\ \frac{y_1 + y_2}{2},\ \frac{z_1 + z_2}{2}\right)

    C=12((0,0,0)+(2,0,0))=(1,0,0)\begin{aligned} C &= \frac{1}{2}\left(\left(0, 0, 0\right) + \left(2, 0, 0\right)\right) \\ &= \left(1, 0, 0\right) \end{aligned}
  2. Radius from the diameter

    The radius is half the length of the diameter, so the squared radius is a quarter of the squared distance between the end points.

    r2=∣P2−P1∣24=22+02+024=44=1\begin{aligned} r^2 &= \frac{\left|P_2 - P_1\right|^2}{4} \\ &= \frac{2^2 + 0^2 + 0^2}{4} \\ &= \frac{4}{4} \\ &= 1 \end{aligned}
  3. Equation of a sphere

    Put the centre and the squared radius into the standard form.

    Using (x−a)2+(y−b)2+(z−c)2=r2\left(x - a\right)^2 + \left(y - b\right)^2 + \left(z - c\right)^2 = r^2

    (x−1)2+y2+z2=1\left(x - 1\right)^{2} + y^{2} + z^{2} = 1
  4. Result

    So the sphere is (x−1)2+y2+z2=1\left(x - 1\right)^{2} + y^{2} + z^{2} = 1.

Worked examples