Skip to main content

Completing the Square Calculator

Solve a quadratic equation, convert it to vertex form for graphing, or see completing the square and the quadratic formula produce the exact same answer — with a geometric area diagram and a parabola graph.

Background

Completing the square turns ax² + bx + c into a(x − h)² + k by literally building a perfect square out of the x² and x terms. Whatever's "missing" to complete that square gets added — and immediately subtracted back out — so the expression's value never actually changes, just its form.

Set up your quadratic

Step 1 — What do you want to do?

Step 2 — Enter your coefficients

Enter whole numbers from -100 to 100. a can't be 0 — that's what makes it quadratic.

Learning options

Result

No result yet. Set up your quadratic above and click Calculate.

How to use this calculator

  • Choose Solve the Equation to find the roots of ax²+bx+c=0, including complex roots when the discriminant is negative.
  • Choose Convert to Vertex Form to find the vertex, axis of symmetry, and minimum/maximum value — the graphing application.
  • Choose Compare with Quadratic Formula to see completing the square and the quadratic formula solve the exact same equation side by side.
  • Click Calculate to see the geometric area diagram, a parabola graph, and full step-by-step working.

How completing the square works

1

If a ≠ 1, divide the whole equation by a first — completing the square only works cleanly on a monic (leading coefficient 1) trinomial.

2

Take half of the x-coefficient and square it: (b/2)². This is exactly the piece needed to turn x²+bx into a perfect square.

3

Add that piece — and immediately account for it — so x² + bx becomes (x + b/2)² − (b/2)², an identity that's true for every x.

4

The vertex of a(x−h)²+k is at (h, k) — read directly off the completed-square form, which is exactly why this method is used for graphing.

5

Doing this once, symbolically, on the general equation ax²+bx+c=0 is literally how the quadratic formula is derived — it's not a separate trick, it's completing the square done in advance.

Formula & Equations Used

Vertex form: a(x−h)²+k, where h = −b/(2a) and k = c − b²/(4a).

Discriminant: D = b² − 4ac — positive gives two real roots, zero gives one repeated root, negative gives two complex roots.

Roots: x = (−b ± √D) / (2a) — the quadratic formula, derived by completing the square on the general equation.

Example Problems & Step-by-Step Solutions

These cover cases the Quick Examples chips above don't already demonstrate.

Example 1 — A projectile's maximum height

A ball's height is h(t) = −16t² + 64t + 5 (feet, t in seconds). What's its maximum height, and when does it occur?

Step: This is a downward parabola (a=−16<0), so the vertex is a maximum. h = −64/(2×−16) = 2, k = 5 − 64²/(4×−16) = 5+64 = 69.

Result: maximum height of 69 feet at t = 2 seconds.

Example 2 — A leading coefficient other than 1

Solve 4x² − 16x + 7 = 0 by completing the square.

Step: Divide by 4 first: x² − 4x + 7/4 = 0. Half of −4 is −2, squared is 4: (x−2)² = 4 − 7/4 = 9/4. So x − 2 = ±3/2.

Result: x = 3.5 or x = 0.5.

Example 3 — Predicting root type from the discriminant

Before fully solving x² − 2x + 10 = 0, predict what kind of roots it has.

Step: D = (−2)² − 4(1)(10) = 4 − 40 = −36. Since D<0, expect two complex conjugate roots — no need to solve first to know that.

Result: completing the square confirms it: x = 1 ± 3i.

Example 4 — Where the quadratic formula actually comes from

Complete the square on the fully general ax²+bx+c=0, using letters instead of numbers.

Step: Divide by a: x² + (b/a)x = −c/a. Add (b/2a)² to both sides: (x + b/2a)² = (b² − 4ac)/(4a²). Take the square root and isolate x.

Result: x = (−b ± √(b²−4ac)) / (2a) — the quadratic formula, with no shortcuts taken.

Frequently Asked Questions

Why do we add (b/2)² specifically?

Because (x + b/2)² expands to x² + bx + (b/2)² — so (b/2)² is exactly the constant that makes x² + bx into a perfect square trinomial. Any other value wouldn't complete the square.

What do complex roots actually mean here?

A negative discriminant means the parabola never crosses the x-axis — it has no real roots. The complex roots are still mathematically valid solutions to the equation; they just don't correspond to visible x-intercepts on a real-number graph.

Is completing the square just a slower way to get the quadratic formula?

For solving one specific equation, the quadratic formula is usually faster. But completing the square is also how you get vertex form for graphing, and it's the actual derivation behind the formula — understanding it means you're not just memorizing a result.

Why does the vertex form use minus h but the vertex itself is at positive h?

Vertex form is written a(x−h)²+k by convention so that h and k can be read directly as the coordinates. If completing the square naturally produces (x+3)², that means h=−3 — the sign flips because the form itself has a built-in minus sign.

The Quadratic Formula
5. BONUS: Mathematical Operations and Functions
10 problems
Topic
5. BONUS: Mathematical Operations and Functions
5 topics 15 problems
Chapter
Intro to Quadratic Equations
1. Equations & Inequalities
4 problems
Topic
Callie
The Quadratic Formula
1. Equations & Inequalities
6 problems
Topic
Callie
The Square Root Property
1. Equations & Inequalities
7 problems
Topic
Callie
Choosing a Method to Solve Quadratics
1. Equations & Inequalities
7 problems
Topic
Callie
1. Equations & Inequalities - Part 1 of 3
4 topics 11 problems
Chapter
Callie
1. Equations & Inequalities - Part 2 of 3
4 topics 10 problems
Chapter
Callie
1. Equations & Inequalities - Part 3 of 3
4 topics 10 problems
Chapter
Callie
Intro to Quadratic Equations
1. Equations and Inequalities
4 problems
Topic
The Quadratic Formula
1. Equations and Inequalities
6 problems
Topic
The Square Root Property
1. Equations and Inequalities
6 problems
Topic
Choosing a Method to Solve Quadratics
1. Equations and Inequalities
5 problems
Topic
1. Equations and Inequalities - Part 1 of 2
7 topics 13 problems
Chapter
1. Equations and Inequalities - Part 2 of 2
5 topics 12 problems
Chapter
The Quadratic Formula
BONUS: Mathematical Operations and Functions
4 problems
Topic
BONUS: Mathematical Operations and Functions - Part 1 of 2
4 topics 9 problems
Chapter
BONUS: Mathematical Operations and Functions - Part 2 of 2
1 topic 2 problems
Chapter
Solving Quadratic Equations
0. Review of College Algebra
1 problem
Topic
0. Review of College Algebra - Part 1 of 2
4 topics 9 problems
Chapter
Patrick
0. Review of College Algebra - Part 2 of 2
4 topics 8 problems
Chapter
Patrick
Back to all calculatorsAll calculators