🧮
🧮 Math & statistics

Diamond Problem Calculator (two numbers from their product and sum)

Results update as you type.

Your numbers

Understanding the diamond problem calculator — concept and principle

This calculator solves diamond problems: find two numbers from their product (top) and sum (bottom), or find the product and sum of two given numbers. It also shows the discriminant and how the answer factors a trinomial. Use it for pre-algebra practice and as the first step of factoring x² + bx + c.

Diamond problemProduct −24, sum 5−24×5+8−3discriminant25 + 96 = 121check8 × −3 · 8 − 3factoring(x + 8)(x − 3)
Find two numbers that multiply to the top and add to the bottom.

How it is calculated

The side numbers m and n satisfy m × n = product and m + n = sum.

They are the roots of t² − (sum)·t + (product) = 0:

m, n = (sum ± √(sum² − 4 × product)) ÷ 2

The principle

Two numbers are completely fixed by their sum and product, because they are the two solutions of one quadratic equation. Expanding (t − m)(t − n) gives t² − (m + n)t + mn, so knowing the sum and product is the same as knowing that quadratic. In factoring, the same pair turns x² + bx + c into a product of two brackets. Whole-number answers exist only when the discriminant is a perfect square.

Worked example

Default inputs: top (product) −24, bottom (sum) 5.

  1. Discriminant = 5² − 4 × (−24) = 25 + 96 = 121 = 11², a perfect square.
  2. m, n = (5 ± 11) ÷ 2 = 8 and −3.
  3. Side numbers: 8, −3; check 8 × (−3) = −24 and 8 + (−3) = 5.
  4. Exact form 8, −3; use in factoring: x² + 5x − 24 = (x + 8)(x − 3).

How to read the result

A negative product means the two numbers have opposite signs; a positive product with a negative sum means both are negative. If the discriminant is not a perfect square, the numbers are irrational and the trinomial does not factor over the whole numbers, though the quadratic formula still solves it.

Common mistakes

Keep in mind: Diamond problems with a negative discriminant have no real solution; the page reports this instead of guessing.

Frequently asked questions

How do you solve a diamond problem?

Find two numbers whose product is the top and whose sum is the bottom.

How does it help with factoring?

For x² + bx + c, the diamond with top c and bottom b gives the numbers in (x + m)(x + n).

What if no whole numbers work?

Use the formula with the square root; the numbers may be irrational or not real.

Sources: OpenStax, Elementary Algebra 2e (2020), §7.2 Factor Trinomials of the Form x² + bx + c

Checked 9 Nov 2026. OpenStax, Elementary Algebra 2e (2020), §7.2 Factor Trinomials of the Form x² + bx + c (find two numbers m and n with m·n = c and m + n = b; then x² + bx + c = (x + m)(x + n)).

🧮 All math & statistics tools →🌍 Calculators by country →