Solve the classic “diamond problem” — find two numbers when you know their sum and their product, a common step in factoring quadratics.
How it works
The two numbers are the roots of the quadratic t² – (sum)t + (product) = 0, solved with the quadratic formula: x, y = (sum ± √(sum² – 4×product)) ÷ 2. A sum of 10 and product of 21 gives 7 and 3.
What this does not include
This finds real-number solutions only. When the sum and product combination has no real solution, this calculator returns no result rather than an imaginary one.
How to use this calculator
- Enter the sum of the two numbers.
- Enter their product.
A worked example
Sum 10, product 21: the two numbers are 7 and 3 (7+3=10, 7×3=21).
Sum 7, product 12: the two numbers are 4 and 3.
What the variables mean
| Variable | Meaning |
|---|---|
| Sum | The two numbers’ total |
| Product | The two numbers’ product |
Edge cases worth knowing
Not every sum-and-product pair has a real solution. A sum of 1 and product of 10 has no pair of real numbers satisfying both conditions — the underlying quadratic has no real roots, so the calculator declines to show a result.
This is the same math behind factoring quadratic trinomials — the “diamond problem” is a common way algebra students practice finding factor pairs before applying them to factoring x²+bx+c.
Why is this called a “diamond problem”?
It’s commonly taught using a diamond-shaped diagram with the product on top, the sum on the bottom, and the two unknown numbers on the sides — a visual method for factoring quadratic expressions.
How does this relate to factoring a quadratic?
Factoring x² + bx + c requires finding two numbers that multiply to c and add to b — exactly what this calculator solves, turning the quadratic into (x – first number)(x – second number).
What if the sum and product don’t have a real solution?
That happens when sum² is less than 4 × product — the underlying quadratic has no real roots, meaning no real pair of numbers satisfies both conditions.