Diamond Problem Calculator
Test cases replayed : 3 of 3 match · Methodology · No outside source listed
Enter the product (top of the diamond) and the sum (bottom); the two side numbers are found from a quadratic equation.
Result
First number
Second number
- s² − 4p (must not be negative)
Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- Product (top of the diamond): enter a number.
- Sum (bottom of the diamond): enter a number.
- Read the result: First number; the panel also shows s² − 4p (must not be negative) and Second number.
How this calculator works
Two numbers x and y with x·y = p and x + y = s are the roots of t² − s·t + p = 0 (Vieta's formulas), so x, y = (s ± √(s² − 4p)) ÷ 2.
If s² − 4p is negative no real numbers work (shown as —). Diamond problems are used to factor x² + bx + c: the two numbers with product c and sum b give (x + x₁)(x + x₂).
The formula
| Symbol | Meaning |
|---|---|
| Product (top of the diamond) | |
| Sum (bottom of the diamond) | |
| s² − 4p (must not be negative) | |
| First number |
Worked example
| Product (top of the diamond) | 12 |
|---|---|
| Sum (bottom of the diamond) | 7 |
| s² − 4p (must not be negative) | 1 |
|---|---|
| Second number | 3 |
First number 4
Each step uses the unrounded value of the step before it; figures on this page are rounded for display.
Frequently asked questions
Which two numbers multiply to 12 and add to 7?
4 and 3, so x² + 7x + 12 = (x + 3)(x + 4).
Which two numbers multiply to −24 and add to 2?
6 and −4: 6 × (−4) = −24 and 6 + (−4) = 2.