Skip to content
LoveToCalc

Theorem — what does that mean?

The pq formula

The Swedish school form of the quadratic formula. Minus half of p, plus or minus the square root of that half squared minus q.

In Swedish: pq-formeln

The pq formula

The relation

x=−p2±(p2)²−q

The roots of x² + px + q = 0: minus half of p, plus or minus the square root of that half squared minus q.

Solve for
Solved for x

x=−p2+(p2)²−q

x=3

x equals (minus ((−2) divided by 2)) plus the square root of ((−2 divided by 2) squared minus (−3)), equals (minus (−1)) plus the square root of ((−1) squared minus (−3)), equals 1 plus the square root of (1 minus (−3)), equals 1 plus the square root of (4), equals 1 plus 2, equals 3. The equation has a second root as well: x = −1.

Working6 steps

Practice questions

You are given

  • x=5
  • q=-15

What the formula says

p is the number in front of x and q is the number standing on its own. The formula only applies once the equation is written as x² + px + q = 0 — a single x² at the front, everything gathered on the left, and a zero on the right.

The ± sign means the calculation is done twice, once with plus and once with minus. That is why a quadratic equation normally has two solutions.

Getting the equation into that shape

If it does not start there, three things may need doing, in this order:

  1. Gather everything on the left. x² + 3x = 10 becomes x² + 3x − 10 = 0.
  2. Divide by the number in front of x². 2x² + 6x − 8 = 0 becomes x² + 3x − 4 = 0. Every term is divided, including the zero — which stays zero.
  3. Read off p and q with their signs. In x² + 3x − 4 = 0, p = 3 and q = −4.

Step two is the difference from the quadratic formula, which handles the coefficient in front of x² without you dividing it away.

How many roots are there?

Everything is decided by the number under the root, (p/2)² − q, known as the discriminant:

Under the root Number of roots
Positive Two distinct
Zero One (a double root)
Negative No real root

A negative value there does not mean you made a mistake. It means the parabola y = x² + px + q lies entirely above the x-axis and never crosses it.

Worked examples

Example 1. Solve x² − 2x − 3 = 0.

Here p = −2 and q = −3.

x = −(−2)/2 ± √((−2/2)² − (−3)) = 1 ± √(1 + 3) = 1 ± 2

The roots are x = 3 and x = −1.

Example 2. Solve 2x² + 10x + 8 = 0.

Divide by 2 first: x² + 5x + 4 = 0, so p = 5 and q = 4.

x = −5/2 ± √((5/2)² − 4) = −2.5 ± √(6.25 − 4) = −2.5 ± 1.5

The roots are x = −1 and x = −4.

Always check. Put the roots back into the original equation. 2 · (−1)² + 10 · (−1) + 8 = 0. It holds.

Common mistakes

Common questions

Why does the card give one answer when the formula has ±? The formula is stated with ±, as in the textbook, but an answer is one number. The card works out the plus branch and prints the other root as a note directly under the answer, so both are there.

What if a term is missing? Set it to zero. x² − 9 = 0 has p = 0, and x² + 4x = 0 has q = 0. Both can be solved with the pq formula, although the first is quicker with the difference of squares and the second by taking out a factor of x.

Where does the formula come from? From completing the square. Write x² + px as (x + p/2)² − (p/2)², and the equation becomes (x + p/2)² = (p/2)² − q, which only needs a square root on both sides.

Looking for another letter? The formula solved for each one
Solved for each letter
Solve forRearrangedWith the numbersComes to
p−(x²+q)x−(3²+(−3))3−2
q−(x²+px)−(3²+(−2)·3)−3
x−p2+(p2)²−q−(−2)2+(−22)²−(−3)3

Last reviewed October 6, 2026 ·How pages are reviewed

Calculate it in practice

Ready-made worksheets with this formula

Sheets that ask this formula, with their answer keys. Open one to see the questions or print it.

High school

  • Quadratic equations with the pq formula

    Eight equations of the form x² + px + q = 0, four discriminants and four with the abc formula. Writing space under each question, and the first one worked in the key.

PolynomialsAll formulas

Put this formula on your site

Copy the code into your page where the formula card should appear. It loads from lovetocalc.com, so it stays current on its own — all we ask is that the credit line comes with it.