ForHosting KIT · Math

General to standard form of a circle

x² + y² − 6x + 4y − 12 = 0 is the circle with center (3, −2) and radius 5. Enter the three coefficients and the square is completed for you, with a warning when no real circle exists. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
D
-6
E
4
F
-12
You get
Radius
5
Radius squared
25
Standard equation
(x - 3)^2 + (y + 2)^2 = 25
General equation
x^2 + y^2 - 6*x + 4*y - 12 = 0

The general form of a circle, x squared plus y squared plus Dx plus Ey plus F equals zero, hides the two things you usually need: where the center is and how big the radius is. This converter completes the square for you and returns the standard form (x minus h) squared plus (y minus k) squared equals r squared, together with the center coordinates h and k, the radius, the radius squared, and both equation strings rendered as readable text. It is built for homework checks, analytic-geometry courses, CAD notes, and any script that receives expanded quadratic coefficients from a textbook, a CAS, or a graphics pipeline and needs the geometric meaning back.

From general form to standard form by completing the square

A circle with center (h, k) and radius r is written in standard form as (x − h)² + (y − k)² = r². Converting back is the classic completing-the-square exercise. Group the x terms and the y terms, add (D/2)² to both sides for x and (E/2)² for y, and the equation collapses to (x + D/2)² + (y + E/2)² = (D/2)² + (E/2)² − F.

Reading off the pieces gives h = −D/2, k = −E/2, and r² = h² + k² − F, so the radius is the positive square root of that quantity. The tool performs exactly this algebra in closed form: it halves the linear coefficients with a sign flip to get the center, evaluates the radicand h² + k² − F, and takes its square root for the radius.

Homework checks for completing the square

Students paste the D, E, F coefficients from a worksheet and compare their hand-written standard form, center, and radius against a deterministic result.

Recovering geometry from CAS or shader output

Scripts that receive expanded quadratic coefficients from a computer-algebra system or graphics pipeline recover the circle center and radius in one call.

Teaching sign conventions in analytic geometry

Instructors demonstrate how h = −D/2 and k = −E/2 flip signs relative to the general coefficients, using live examples that match the textbook line by line.

What is the general form of a circle?

The center is h = −D/2, k = −E/2, and r² = h² + k² − F.

What is the standard form of a circle?

The standard form is (x − h)² + (y − k)² = r², where (h, k) is the center and r is the positive radius. It is what this converter returns.

Why is my input rejected with a non-positive radius squared error?

Because h² + k² − F came out zero or negative. Zero means the equation describes a single point; negative means no real circle exists (an imaginary circle).

Does it handle coefficients where x² and y² have a scale other than 1?

No. Divide the whole equation by that common coefficient first so x² and y² both have coefficient 1, then send d, e, and f.

Are the results deterministic?

Yes. The conversion is closed-form arithmetic rounded to six decimals, with no network, randomness, or clock involved, so identical inputs always produce identical output.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/math/general-to-standard-form-circle

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/math/general-to-standard-form-circle \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"d":-6,"e":4,"f":-12}'
{
  "d": -6,
  "e": 4,
  "f": -12
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "math.general_to_standard_form_circle",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

max_abs1000000000000
min_radius1e-15
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

The solve path is deterministic pure arithmetic — no network calls, no randomness, no clock dependence — so the free browser tool on this page and the prepaid API return the same JSON, byte for byte after fixed decimal rounding, every single time you call it.

From general form to standard form by completing the square

Expanding those squares and collecting terms produces the general form x² + y² + Dx + Ey + F = 0, where D = −2h, E = −2k, and F = h² + k² − r². Because the general form always has matching coefficients of 1 on x² and y² and no xy term, no scaling or rotation step is ever needed — the conversion is three coefficients in, center and radius out, with the standard and general equation strings rendered from the same rounded values so what you read matches what the API computed.

API inputs, outputs, and error behavior

Every numeric result is rounded to six decimals so the output is stable across machines and runtimes. A zero radicand means the equation describes a single point, and a negative one means no real circle exists at all, sometimes called an imaginary circle; the error message tells you which case you hit and shows the offending radicand. Send a JSON body with the three coefficients of x² + y² + Dx + Ey + F = 0: d, e, and f. All three are required and must be finite numbers; the aliases D, E, F and coeff_d, coeff_e, coeff_f map to the same fields, which is convenient when you copy coefficients straight out of a CAS dump. On success the response echoes d, e, and f, then reports a nested center object with h and k, the radius, the radius_squared value, human-readable standard_equation and general_equation strings, and method set to completing_the_square. On failure the API returns invalid_input and the request is never charged: that covers missing or non-numeric coefficients, values outside the published absolute range of one trillion, and — most importantly — any coefficient triple whose computed radius squared is zero or negative. Pricing is a flat $0.002 per successful request with unit item and zero marginal unit price.

Practical tips, worked examples, and limits

Start with the textbook classics to build confidence. A degenerate case like x² + y² + 2x + 2y + 2 = 0 yields radius squared zero and is rejected as a single point, while x² + y² + 1 = 0 yields a negative radicand and is rejected as an imaginary circle. The unit circle x² + y² − 1 = 0 has d = 0, e = 0, f = −1 and converts to center (0, 0) with radius 1. A translated circle like x² + y² − 6x + 4y − 12 = 0 has d = −6, e = 4, f = −12 and converts to center (3, −2) with radius 5, giving the standard equation (x − 3)² + (y + 2)² = 25 — note how the signs flip between the general coefficients and the center coordinates, which is the most common hand-algebra mistake this tool helps you catch. Units are whatever you pass — metres, pixels, or abstract coordinates — as long as you stay consistent; the API does not convert units for you. For round-trip verification, expand the returned standard form by hand and confirm you recover D, E, and F within floating-point tolerance, or feed the same coefficients twice and confirm the JSON matches byte for byte.

What does it cost?

$0.002 per successful request. Failed validation returns invalid_input and is never charged. It is also free to run in your browser on this page.

Read the full KIT documentation →