Home · Everyday · Algebra · Diamond Problem Calculator
Diamond Problem Calculator
Recover the two numbers hidden in a diamond problem: the pair whose sum sits at the bottom and product at the top.
What this calculator does
Recover the two numbers hidden in a diamond problem: the pair whose sum sits at the bottom and product at the top. Where a measure is involved, US and metric units are both accepted — flip the unit toggle and the figures convert with the same definitions the formula uses. Every result on this page is computed from the formula stated below, with no hidden rounding steps.
The formula and method
If two numbers add to s and multiply to p, they are the roots of t² − s·t + p = 0. The quadratic formula gives them directly as (s ± √(s² − 4p))/2 — the same pair you would find by factoring in a diamond (factor-pair) puzzle.
Real answers exist only when s² ≥ 4p; a negative discriminant means no real pair fits, and you will see an error rather than a number. When s² = 4p both numbers are equal to s/2.
Worked example
With the example inputs this page opens with (sum s (bottom) 10, product p (top) 21), the result is 7.0000 — larger number. Computed from the inputs on this page with the formula below — change any figure and every result updates.
Quick reference
| Product p (top) | Larger number | Smaller number | Discriminant s² − 4p |
|---|---|---|---|
| 0 | 10 | 0 | 100 |
| 9 | 9 | 1 | 64 |
| 16 | 8 | 2 | 36 |
| 21 | 7 | 3 | 16 |
| 24 | 6 | 4 | 4 |
| 25 | 5 | 5 | 0 |
Computed with the same formulas as the calculator above — enter any values there for figures beyond this table.
Common questions
Why does this match factoring x² + sx + p?
Because the two diamond numbers are exactly the roots of that quadratic: expanding (t − u)(t − v) gives t² − (u+v)t + uv.
How does the Diamond Problem Calculator work?
Recover the two numbers hidden in a diamond problem: the pair whose sum sits at the bottom and product at the top. Sum s · Product p → Larger number. The result updates as you type, and the formula and method on this page state the exact definitions used, so you can reproduce the calculation by hand.
What inputs does the Diamond Problem Calculator need?
Sum s · Product p → Larger number. Invalid entries — such as a zero denominator, an out-of-range value or a malformed list — produce a plain-language message instead of a misleading number.
Is the Diamond Problem Calculator free to use?
Yes. It runs entirely in your browser with no sign-up, and the same calculator is available as an embeddable widget via the Embed button, so it can be placed on another site with its calculation intact.