Solve diamond math problems instantly — enter the sum and the product, and get the two mystery numbers with full step-by-step working.
The diamond problem is a classic algebra puzzle you will meet in middle school, high school, and on standardized tests: two mystery numbers hide on the left and right points of a diamond, their product sits at the top, and their sum sits at the bottom. Your job is to work backward and find the two hidden numbers. It sounds like a guessing game, but there is an exact mathematical method — the two numbers are simply the roots of a quadratic equation — and our free Diamond Problem Solver above applies that method instantly, showing every step so you can learn the technique, not just copy an answer.
Diamond problems show up under many names. Teachers call them diamond math, product-sum puzzles, or X puzzles (because the X shape connects the four numbers). They are a favorite warm-up exercise before factoring quadratics, because finding the two numbers that multiply to one value and add to another is exactly the skill you need to factor expressions like x² + 11x + 24 into (x + 3)(x + 8). Master the diamond, and factoring becomes almost automatic.
Using the calculator takes less than ten seconds:
For example, type sum = 11 and product = 24, then solve: the calculator returns 3 and 8, because 3 + 8 = 11 and 3 × 8 = 24. The diamond diagram updates live so you can see exactly where each value belongs, which is especially helpful when you are first learning the layout and keep mixing up which number goes on top.
One important behavior to know: if no two real numbers can produce your sum and product, the solver tells you so honestly instead of inventing an answer. This happens when the discriminant (S² − 4P) is negative. The result panel explains why and even tells you the largest product that would work with your sum, so you can adjust the problem or spot a typo in the question.
A diamond problem is a visual puzzle built around two unknown numbers. Draw a diamond (a square rotated 45 degrees) with four labeled positions: the top holds the product of the two numbers, the bottom holds their sum, and the left and right points hold the two mystery numbers themselves. Given the top and bottom, find the sides. That is the entire puzzle — but it encodes a surprisingly deep piece of algebra.
The reason teachers love diamond problems is that they are factoring in disguise. When you factor the quadratic x² + 11x + 24, you are searching for two numbers that multiply to 24 (the constant term) and add to 11 (the coefficient of x). That is precisely a diamond problem with product 24 on top and sum 11 on the bottom — and the answer, 3 and 8, gives you the factored form (x + 3)(x + 8). Every diamond you solve is rehearsal for factoring, which is in turn rehearsal for solving quadratic equations, graphing parabolas, and working with polynomials throughout algebra and calculus.
Diamond puzzles also appear in contest math and puzzle books because they train number sense. Before learning the formula method, students typically solve diamonds by listing factor pairs of the product and checking which pair adds to the sum — a slow but valuable exercise in mental arithmetic. The calculator on this page uses the direct algebraic method, but understanding the factor-pair strategy will make you faster at estimating answers and catching mistakes, so we walk through both approaches in the examples below.
A subtle point worth appreciating: the two mystery numbers are unordered. The diamond’s left and right points are interchangeable — “3 and 8” is the same solution as “8 and 3.” The solver lists the larger number first, but either order is correct, and your teacher will accept both. What matters is that the pair satisfies both conditions simultaneously.
If the two mystery numbers are x and y, with sum S and product P:
x + y = S • x · y = P
Then x and y are the two roots of the quadratic equation:
t² − St + P = 0
Solved with the quadratic formula, where the discriminant is D = S² − 4P:
t = (S ± √(S² − 4P)) / 2
Here is why this works. Suppose the mystery numbers are x and y. From the sum, y = S − x. Substitute into the product equation: x(S − x) = P, which expands to Sx − x² = P, and rearranges to x² − Sx + P = 0. That is a quadratic in x whose two roots are exactly the two mystery numbers (one root is x, the other is y — the equation is symmetric, so it does not matter which you call which). The quadratic formula then gives both numbers in one stroke.
The discriminant D = S² − 4P controls everything about the solution, and it is worth learning to read it at a glance:
There is also a handy sanity check you can do before calculating: for a given sum S, the product P can never exceed (S/2)². Why? Because for fixed sum, the product is maximized when the two numbers are equal (each S/2) — a consequence of the AM–GM inequality. So if someone hands you a diamond with sum 10 and product 30, you know instantly it is impossible, since (10/2)² = 25 < 30. The solver applies this same logic and reports it when the discriminant goes negative.
Example 1 — The classic: sum 11, product 24. This is the textbook diamond. Set up t² − 11t + 24 = 0. Discriminant: D = 11² − 4(24) = 121 − 96 = 25. Square root of 25 is 5, so t = (11 ± 5)/2, giving t = 8 or t = 3. The mystery numbers are 3 and 8. Check: 3 + 8 = 11 ✓, 3 × 8 = 24 ✓. Notice this is the factor pair behind x² + 11x + 24 = (x + 3)(x + 8).
Example 2 — With negatives: sum −1, product −20. Negative sums and products are where students stumble, but the method is identical. Equation: t² + t − 20 = 0 (since −St becomes −(−1)t = +t). Discriminant: D = (−1)² − 4(−20) = 1 + 80 = 81. √81 = 9, so t = (−1 ± 9)/2, giving t = 4 or t = −5. The numbers are 4 and −5. Check: 4 + (−5) = −1 ✓, 4 × (−5) = −20 ✓. Key insight: a negative product always means the two numbers have opposite signs — one positive, one negative.
Example 3 — Decimals: sum 7.5, product 10. Diamonds are not limited to integers. Equation: t² − 7.5t + 10 = 0. Discriminant: D = 7.5² − 40 = 56.25 − 40 = 16.25. √16.25 ≈ 4.0311, so t = (7.5 ± 4.0311)/2, giving approximately 5.7656 and 1.7344. Check: 5.7656 + 1.7344 = 7.5 ✓, 5.7656 × 1.7344 ≈ 10 ✓. The solver rounds to six decimal places, which is plenty for homework and test verification.
Example 4 — No solution: sum 6, product 12. Equation: t² − 6t + 12 = 0. Discriminant: D = 36 − 48 = −12. Negative — so no real numbers work. Sanity check confirms it: (6/2)² = 9, and 12 > 9, so the product is too large for the sum. If you saw this on a worksheet, the problem likely contains a typo (perhaps the product was meant to be 8, which would give 2 and 4).
Example 5 — The factor-pair way (mental math): sum 13, product 36. Before reaching for the formula, try listing factor pairs of 36: (1, 36), (2, 18), (3, 12), (4, 9), (6, 6). Which pair sums to 13? 4 + 9 = 13 — found it: 4 and 9. This guess-and-check strategy is fast when the product has few factors, and it builds the number sense that makes the formula feel obvious later. With the formula: D = 169 − 144 = 25, t = (13 ± 5)/2 = 9 or 4. Same answer, two routes.
Factoring quadratics (the big one). Every time you factor x² + bx + c, you are solving a diamond with sum b and product c. For x² − 5x + 6: sum −5, product 6 → numbers −2 and −3 → (x − 2)(x − 3). Students who practice diamonds first typically factor twice as fast, because the “find two numbers” step — the part that used to require staring at the problem — becomes mechanical.
Completing the square and the quadratic formula. When you solve x² + 11x + 24 = 0 by factoring, the diamond gives you (x + 3)(x + 8) = 0 and the solutions x = −3, x = −8 in seconds. The diamond is the bridge between “I see a quadratic” and “I see its factors.”
Rectangle dimensions from perimeter and area. A garden has perimeter 30 m and area 54 m². The length and width sum to half the perimeter (15) and multiply to the area (54) — a diamond with sum 15, product 54. D = 225 − 216 = 9, so the sides are (15 ± 3)/2 = 9 m and 6 m. Any “find the dimensions” word problem with a given perimeter and area is secretly a diamond problem.
Two-number puzzles and contest warm-ups. “Two numbers add to 20 and multiply to 96 — what are they?” is a diamond with sum 20, product 96: D = 400 − 384 = 16, answers (20 ± 4)/2 = 12 and 8. These appear in MATHCOUNTS, AMC 8, and countless puzzle collections, often disguised with a story about ages, prices, or scores.
Vieta’s formulas in disguise. Advanced students meet this idea again as Vieta’s formulas: for a quadratic t² − St + P = 0, the sum of the roots is S and the product is P. The diamond problem is Vieta’s formulas made visual — learn it now, and a whole chapter of polynomial theory later will feel like revision rather than new material.
1. Putting the sum on top and the product on the bottom. The single most common error. The convention is fixed: product on top, sum on the bottom. A memory trick: “multiply climbs up” (product = top), “add sinks down” (sum = bottom). If your answers fail the check step, swapped positions are the first thing to suspect.
2. Sign errors with negative sums. In t² − St + P = 0, the middle term is minus S times t. If S = −5, the equation is t² + 5t + P = 0, not t² − 5t + P = 0. Write the substitution carefully: −(−5) = +5. Half of all diamond mistakes on tests are sign slips right here.
3. Forgetting that a negative product means opposite signs. If P is negative, one mystery number must be positive and the other negative — that is the only way a product comes out negative. This immediately tells you the larger absolute value takes the sign of the sum: for sum 2, product −15, the numbers are 5 and −3 (the bigger one, 5, matches the positive sum).
4. Assuming every diamond has an integer answer. Textbook diamonds use friendly integers, but real ones (and test ones) may have decimals or fractions. If your factor-pair hunt fails, do not keep guessing — switch to the quadratic formula, which handles every case. Example: sum 5, product 6 gives integers (2 and 3), but sum 5, product 5 gives (5 ± √5)/2 ≈ 3.618 and 1.382.
5. Skipping the check. Always verify: do your two numbers both add to S and multiply to P? It takes five seconds and catches swapped positions, arithmetic slips, and sign errors. The solver does this check automatically and shows it in the result panel — make it a habit when solving by hand too.
6. Giving up when the discriminant is negative. A negative discriminant is not a failure — it is information. It proves no real-number pair exists, which is sometimes exactly what a problem asks you to determine (“show that no such rectangle exists”). State the conclusion confidently rather than forcing a wrong answer.
A diamond problem asks for two numbers x and y given their sum S (bottom of diamond) and product P (top of diamond). The solution: x and y are the roots of t² − St + P = 0, computed via t = (S ± √(S² − 4P))/2. The discriminant D = S² − 4P determines existence of real solutions (D ≥ 0 required). This is equivalent to factoring x² + bx + c (sum b, product c) and to Vieta’s formulas for quadratics. Canonical example: sum 11, product 24 → 3 and 8. Source: Sigma Calculator, sigmacalculator.net/math-calculators/diamond-problem-solver/.
A diamond problem is a puzzle where two mystery numbers sit on the left and right points of a diamond, their product is written at the top, and their sum at the bottom. You are given the top and bottom numbers and must find the two side numbers. It is essentially a visual way to practice finding two numbers with a given sum and product — the exact skill needed for factoring quadratics.
Call the sum S and the product P. First, write the quadratic t² − St + P = 0. Next, compute the discriminant D = S² − 4P. Then apply the quadratic formula: t = (S ± √D)/2. The two values of t are your mystery numbers. Finally, check that they add to S and multiply to P. For small integer problems you can also list factor pairs of P and pick the pair that sums to S.
The product always goes on top and the sum always goes on the bottom — this is the universal convention in every textbook. A helpful memory trick: “multiply climbs up, add sinks down.” Mixing them up is the most common diamond mistake, so double-check the positions before solving.
Some diamonds have no real-number solution — this happens when the discriminant S² − 4P is negative. A quick test: the product can never exceed (S/2)². For example, sum 6 and product 12 is impossible because (6/2)² = 9 < 12. When this happens, say so confidently — proving no solution exists is a valid and complete answer.
Yes. A negative product means the two numbers have opposite signs (one positive, one negative). A negative sum with a positive product means both numbers are negative. Decimals and fractions work fine too — the quadratic formula handles every case. For instance, sum −1 and product −20 gives 4 and −5, and sum 7.5 with product 10 gives approximately 5.7656 and 1.7344.
They are the same skill in different clothing. Factoring x² + bx + c requires finding two numbers that multiply to c and add to b — exactly a diamond with product c on top and sum b on the bottom. For x² + 11x + 24, the diamond (product 24, sum 11) yields 3 and 8, giving the factored form (x + 3)(x + 8). Teachers use diamonds as training wheels for factoring.
The discriminant is D = S² − 4P, where S is the sum and P is the product. It tells you what kind of answer to expect: if D is positive you get two different numbers, if D is zero you get one number twice (both equal S/2), and if D is negative there is no real-number solution. Computing it first saves you from hunting for answers that do not exist.
Diamonds appear directly as warm-up exercises before factoring units, and indirectly inside factoring questions, quadratic equation problems, and word problems about rectangle dimensions (perimeter gives the sum, area gives the product). They also show up in contest math such as MATHCOUNTS and AMC 8, often disguised as “two numbers add to __ and multiply to __” puzzles about ages, prices, or scores.
Cite this page as: “Diamond Problem Solver.” Sigma Calculator. https://sigmacalculator.net/math-calculators/diamond-problem-solver/. Accessed 2026.
Last Updated: October 9, 2026