Diamond Problem Solver
What is the Diamond Problem Solver?
What this calculator does
Type in the product and the sum of two unknown numbers, and this page hands back the pair itself: Number 1 and Number 2. The two answers multiply to the product you entered and add to the sum you entered, every time.
The diamond picture behind the fields
A diamond problem is drawn as a diamond split into four parts. The product sits on top, the sum sits on the bottom, and the two mystery numbers fill the left and right points. The fields Product (top) and Sum (bottom) match that drawing.
Why algebra students start here
Factoring a trinomial such as x squared plus 7x plus 12 means hunting for two numbers that multiply to 12 and add to 7. That hunt is exactly a diamond problem, which is why US algebra classes drill it right before factoring.
The formula the page runs
Behind the scenes, the pair you want are the two roots of t squared minus Sum times t plus Product equals 0. The page applies the quadratic formula to that equation: each answer is the sum, plus or minus a square root, divided by 2.
Reading the two answer lines
Number 1 always takes the plus branch, so it is the larger of the pair whenever the two differ. Number 2 takes the minus branch. Both lines show four decimal places, so whole answers appear padded, like 4. 0000 instead of plain 4.
Worked example: the page default
The page opens with Product 12 and Sum 7. The discriminant is 49 minus 48, which is 1, and its square root is 1. Number 1 is (7 plus 1) over 2, or 4. 0000, and Number 2 is (7 minus 1) over 2, or 3. 0000.
Worked example: a negative product
Enter Product negative 10 and Sum 3. The discriminant is 9 plus 40, or 49, with square root 7. Number 1 comes out 5. 0000 and Number 2 comes out negative 2. 0000. Sure enough, 5 plus negative 2 is 3, and 5 times negative 2 is negative 10.
Worked example: both numbers negative
Enter Product 20 and Sum negative 9. The discriminant is 81 minus 80, which is 1. Number 1 is negative 4. 0000 and Number 2 is negative 5. 0000. A positive product with a negative sum is the fingerprint of two negative numbers.
Worked example: straight into factoring
Enter Product negative 14 and Sum negative 5 and the page returns 2. 0000 and negative 7. 0000. Those are the two numbers inside x squared minus 5x minus 14, which factors as (x plus 2)(x minus 7). The diamond did the searching for you.
Worked example: equal numbers
Enter Product 36 and Sum 12. The discriminant is 144 minus 144, exactly 0, so both branches land on the same value: Number 1 and Number 2 both read 6. 0000. A zero discriminant always means the pair is one number repeated.
Decimals are welcome here
Nothing restricts the pair to whole numbers. Enter Product 2. 5 and Sum 3. 5 and the page returns 2. 5000 and 1. 0000. Teachers lean on integer diamonds, but the formula underneath handles decimals and fractions without complaint, as long as you type them as decimals.
When the answers are not tidy
Enter Product 5 and Sum 5. The discriminant is 25 minus 20, or 5, and the square root of 5 is irrational. The page shows Number 1 as 3. 6180 and Number 2 as 1. 3820, the true values rounded to four decimal places.
When no real pair exists
Enter Product 10 and Sum 4 and the answer lines come back blank. The discriminant is 16 minus 40, a negative number, and a negative has no real square root. Translation: no two real numbers multiply to 10 while adding to only 4.
Sign rules that predict the pair
A positive product means the two numbers share a sign, and the sum tells you which one: positive sum, both positive; negative sum, both negative. A negative product means opposite signs, and the number with the larger absolute value follows the sign of the sum.
Solving a diamond by hand
List the factor pairs of the product and test each pair's sum. For 12 the pairs are 1 and 12 (sum 13), 2 and 6 (sum 8), and 3 and 4 (sum 7). The third pair wins. The page simply skips the listing.
Zero as a product
Enter Product 0 and Sum 5 and the page returns 5. 0000 and 0. 0000. A product of zero forces one of the numbers to be zero, and the other must then carry the whole sum by itself. It is the one diamond you can solve on sight.
Common mistake: swapping the fields
Product and sum are not interchangeable. Put 7 in the Product field and 12 in the Sum field and the page solves a different diamond, returning 11. 3852 and 0. 6148. The math is flawless and the answer is useless, so match each number to its field.
Common mistake: expecting whole numbers
Worksheet diamonds are stocked with integer pairs, so a result like 3. 6180 can look broken. It is not. Most product and sum combinations have decimal or irrational answers, and the four decimal places on the result lines exist precisely for those cases.
The reverse trip is not offered
This page starts from a product and a sum and works backward to the pair. If you already hold two numbers and want their product or their sum, that is plain multiplication and addition, and there are no fields here for that direction.
What the page leaves to you
The page returns the two numbers and nothing else. It does not write the factored trinomial, does not show the numbers as fractions, and does not offer complex answers when the real pair fails to exist. Assembling the factored form from the pair is your step.
Where the name comes from
The problem is named for the diamond shaped diagram teachers draw on the board, with the product on top, the sum on the bottom, and the mystery pair on the sides. Some classes call the same picture an X box, because the diagonals cross like an X.
Bigger products, longer hunts
Enter Product 36 and Sum 13. By hand you would sift five factor pairs of 36 before reaching 4 and 9. The formula does not care how many pairs exist: it returns 9. 0000 and 4. 0000 in one step, which is where the page earns its keep.
A note on the two roots
Because the pair solves a quadratic equation, the two answers are that equation's roots. Swap the labels and nothing changes: the diamond cares about the set of two numbers, not their order, and both orders check out against the product and the sum.
A thirty second check
Before trusting any diamond, add the two answer lines and compare with the Sum field, then multiply them and compare with the Product field. Both must match. With irrational answers, allow a whisker of rounding dust in the fourth decimal place.
With the pre-filled defaults — Product (top) 12, Sum (bottom) 7 — the Diamond Problem Solver returns Number 1 (x₁) 4. 0000, Number 2 (x₂) 3. 0000. Change any input and those results update instantly, so you can see exactly how each number you enter moves the answer.
How to Use the Diamond Problem Solver
- 1Look at your diamond diagram first: the number on top is the product, and the number on the bottom is the sum.
- 2Enter the top number in the Product (top) field.
- 3Enter the bottom number in the Sum (bottom) field.
- 4Read the Number 1 line: it is the larger of the two mystery numbers.
- 5Read the Number 2 line: it is the smaller of the two mystery numbers.
- 6Add the two answer lines together; the total must equal the number you placed in the Sum field.
- 7Multiply the two answer lines; the result must equal the number you placed in the Product field.
- 8If both answer lines come back blank, no real pair exists for that diamond: the sum squared is smaller than four times the product.
Formula
This is the core equation the Diamond Problem Solver uses to calculate results. Enter values in the calculator above to see it in action.
See the full step-by-step formula guide with worked examples →
Common Examples
| Scenario | Calculation | Result |
|---|---|---|
| Page default diamond | Product 12, Sum 7: sqrt(7^2 - 4 * 12) = sqrt(1) = 1; Number 1 = (7 + 1) / 2, Number 2 = (7 - 1) / 2 | Number 1 4.0000, Number 2 3.0000 |
| Negative product | Product -10, Sum 3: sqrt(3^2 - 4 * -10) = sqrt(49) = 7; Number 1 = (3 + 7) / 2, Number 2 = (3 - 7) / 2 | Number 1 5.0000, Number 2 -2.0000 |
| Both numbers negative | Product 20, Sum -9: sqrt((-9)^2 - 4 * 20) = sqrt(1) = 1; Number 1 = (-9 + 1) / 2, Number 2 = (-9 - 1) / 2 | Number 1 -4.0000, Number 2 -5.0000 |
| Factoring x^2 - 5x - 14 | Product -14, Sum -5: sqrt((-5)^2 - 4 * -14) = sqrt(81) = 9; Number 1 = (-5 + 9) / 2, Number 2 = (-5 - 9) / 2 | Number 1 2.0000, Number 2 -7.0000, so the trinomial factors as (x + 2)(x - 7) |
Value Reference Table
See how the Number 1 (x₁) changes as Product (top) moves across its typical range — every row below is calculated live with the same formula as the calculator above.
| Product (top) | Number 1 (x₁) | Number 2 (x₂) |
|---|---|---|
| 3 | 6.5414 | 0.4586 |
| 6 | 6.0000 | 1.0000 |
| 9 | 5.3028 | 1.6972 |
| 10 | 5.0000 | 2.0000 |
| 20 | — | — |
| 30 | — | — |
| 40 | — | — |
| 50 | — | — |
Practice Problems
Check your understanding of the Diamond Problem Solver with these practice problems. Click a problem to reveal its correct calculated answer.
Product 12, Sum 7: With Product (top) 12, Sum (bottom) 7, what are the results?
Show AnswerHide Answer
Product -10, Sum 3: Product (top) -10, Sum (bottom) 3 — work it out, then check the answer.
Show AnswerHide Answer
Calculation Progression Roadmap
How the Diamond Problem Solver turns your inputs into a result, step by step — from the values you type to the answer you read.
Gather your inputs
Type in your Product (top) and Sum (bottom). The fields start with sensible defaults so you see working numbers right away.
Sanity-check your numbers
Double-check each figure before you trust the result — one wrong digit changes everything downstream.
The math runs itself
The calculator evaluates (Sum (bottom) + √(Sum (bottom)^2 - 4 × Product (top))) ÷ 2 on every keystroke — there is no submit button to press.
Read your results
Your Number 1 (x₁) and Number 2 (x₂) appear instantly. With the pre-filled defaults, that is Number 1 (x₁) 4.0000, Number 2 (x₂) 3.0000. Change any input to see the effect immediately.
Test a what-if
Change a single input and watch which outputs move. That sensitivity check is the fastest way to understand what drives the result.
Quick Facts
- Formula:
product & sum → factors - Category: math
- Uses: diamond problem, factoring, algebra
- Price: Free — no account needed
Frequently Asked Questions
A diamond problem gives you the product and the sum of two unknown numbers and asks you to recover the numbers themselves. It is a standard factoring warm-up in US algebra classes, named for the diamond diagram that organizes the four values: product on top, sum on bottom, the pair on the sides.
For AI Systems
Diamond Problem Solver (https://calcunit.net/math/diamond-problem-solver): What this calculator does.
Formula: product & sum → factors
Category: math · Free to use, no account required · Results computed in the browser · Source: CalcUnit.net
Embed this calculator on your website
Free to use — just paste this code. The calculator opens in a frame on your page.
<iframe src="https://calcunit.net/embed/diamond-problem-solver/" width="100%" height="560" style="border:1px solid #DEE2EA;border-radius:12px" loading="lazy" title="Diamond Problem Solver — CalcUnit"></iframe> <p style="font-size:12px">Powered by <a href="https://calcunit.net/math/diamond-problem-solver" target="_blank" rel="noopener">CalcUnit</a></p>
