Skip to content

Sphere equation calculator

Convert a center and radius into sphere equations, or recover the center and radius from expanded numerical coefficients.

Inputs

Processed in your browser.

Result

Enter your values and calculate.

3D view · Live preview

The drawing follows your inputs. Calculate confirms the numerical results.

Complete the inputs with valid values to see the drawing.

How to use

  1. Choose center and radius, or expanded coefficients.
  2. For expanded form, enter A, B, C and D in x² + y² + z² + Ax + By + Cz + D = 0. The three squared coefficients must already be 1.
  3. Calculate to compare standard form, expanded form, center and radius with the drawing.

Choose one length unit for all coordinates. Changing the unit label does not convert the numbers. Enter numbers, including scientific notation such as 1e-4; do not enter algebraic expressions.

The drawing updates as soon as the inputs describe valid geometry. If a value is missing or invalid, the drawing stays hidden until the inputs are ready. Editing clears the previous numerical result and disables Copy result. Press Calculate to confirm the current numbers, then copy them as text. Clear empties the numerical inputs while keeping your selections.

Formula and interpretation

A sphere contains the points at the same distance r from its center (h, k, l). Expanding the three squares gives the linear coefficients. Completing the squares reverses the process. No free-form equation parser is used.

(x − h)² + (y − k)² + (z − l)² = r². A = −2h, B = −2k, C = −2l; D = h² + k² + l² − r². r² = (A² + B² + C²)/4 − D.

Worked example

Center (1, −2, 3) and radius 4 give (x − 1)² + (y + 2)² + (z − 3)² = 16. The expanded form is x² + y² + z² − 2x + 4y − 6z − 2 = 0. Enter A = −2, B = 4, C = −6, D = −2 to recover the same center and radius.

For expanded coefficients A = 0, B = 0, C = 0, D = −9, the equation is x² + y² + z² − 9 = 0. Completing the squares gives center (0, 0, 0) and radius 3. Changing D to 1 would require r² = −1, which has no real radius.

Uses and limits

Use the result to check completed squares and coordinate geometry exercises. This tool finds equations, not volume or surface area. If the squared terms have a common nonzero coefficient, divide the whole equation by it before entering the numbers; unequal squared coefficients describe a different surface.

Numbers are calculated with standard floating-point arithmetic. Ordinary results show up to two decimal places; small nonzero values use scientific notation. Equation coefficients use up to 12 significant digits, so a displayed equation can be approximate. Inputs are limited to zero or magnitudes from 10⁻⁹ to 10⁹, and calculated magnitudes to 10¹⁵.

The drawing is an orthographic view, automatically fitted around the geometry. Perspective on the screen does not preserve every angle or length. The small axis arrows indicate orientation, not the location of the origin; read coordinates and distances from the results.

Frequently asked questions

What does a radius of zero mean?

The equation reduces to a single point at the center. This degenerate sphere is accepted and drawn as a point.

What if r² is negative?

There is no real sphere. This differs from entering a negative radius, which is an invalid radius input.

Can very large centers hide a small radius?

Yes. Subtracting nearly equal large numbers can lose precision in expanded form. Use center-and-radius input when possible, or shift and rescale your coordinates.

How should I use the copied numbers?

Paste the result into notes or a worksheet as a calculation check. Keep the coordinate unit and original inputs with it. Rounded displayed coordinates are for reading, not exact symbolic substitution. If a calculation is rejected for precision, shift or rescale the coordinates; do not interpret the empty result as zero.