CalcaTools

Diamond Problem Calculator

Solve diamond math problems: find the two numbers from their sum and product, with a diagram.

Last updated: June 2026 · Free · No sign-up required

Results

Enter values above and click Calculate to see your result instantly.

Quick reference

SumProductThe two numbers
7123 and 4
562 and 3
−1−123 and −4
10255 and 5

functions Shows the working, not just the answer

For students and teachers, the final number is only half the value. Every math tool here exposes the formula it applied, the intermediate steps, and the rounding rule, so you can follow along, check your homework, or use the answer in a proof or report with confidence.

calculate Accurate to the spec

Calculations use 64-bit floating point with sensible rounding for the domain (currency to 2 decimals, percentages to 4 decimals, algebra to 6 significant figures). Where exact rational arithmetic matters — fractions, factorials, simplification — we use a dedicated BigNumber path so 1/3 + 1/6 returns ½, not 0.49999.

school Free for classroom use

Educators are welcome to link to any math calculator on CalcaTools from a class site, Google Classroom, or worksheet. The pages are mobile-friendly, free, ad-supported (so we can keep them free) and have no sign-up wall — students just click and use them in class or at home.

tips_and_updates Pair with the spoke articles

Below the calculator we link a small set of plain-English explainer pages — "What is a percentage?", "Why does PEMDAS matter?", and so on. They cover the underlying concept in 4–6 short paragraphs. Read those before the calculator if the topic is new, or after if you want the extra context.

Interpretation guide

Discriminant s² − 4pResult
PositiveTwo distinct real numbers
ZeroOne repeated number (s/2 twice)
NegativeNo real solution — the pair is complex

Formula & methodology

Formula: Numbers = [s ± √(s² − 4p)] / 2 — the roots of x² − sx + p = 0

  1. Enter the sum (bottom of the diamond) and the product (top).
  2. The two numbers are the roots of x² − sx + p = 0, found with the quadratic formula.
  3. The result is verified by adding and multiplying back.

Worked example: sum 7, product 12 → x² − 7x + 12 = 0 → 3 and 4 (3+4=7 ✓, 3×4=12 ✓) — exactly how you factor x² + 7x + 12 = (x+3)(x+4).

Frequently asked questions

What is the diamond problem in math?
A diamond (X) diagram with a product on top and a sum on the bottom: you find the two side numbers that multiply to the top and add to the bottom. It's the core skill for factoring quadratics.
How do you solve a diamond problem?
List factor pairs of the product and pick the pair that adds to the sum — or solve x² − sx + p = 0 directly, which is what this calculator does.
What two numbers add to 7 and multiply to 12?
3 and 4: 3 + 4 = 7 and 3 × 4 = 12.
What if no whole numbers work?
The pair may be fractional or irrational — the quadratic formula still finds it. If s² − 4p is negative, no real pair exists at all.
How does the diamond method help factor trinomials?
To factor x² + bx + c you need two numbers that add to b and multiply to c — exactly the diamond problem with sum b and product c.