Skip to content
FiftyCalc Free calculators for all 50 states

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

Sample figures

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.

Diamond Problem Calculator

Product (top of the diamond): enter a number. Prefilled example: 12.

Sum (bottom of the diamond): enter a number. Prefilled example: 7.

How to use this calculator

Fill in the fields in this order; each step takes you to its field.

  1. Product (top of the diamond): enter a number.
  2. Sum (bottom of the diamond): enter a number.
  3. 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

  1. D=s2−4×p
  2. X1=s+D2+0
Symbols used in the formula
SymbolMeaning
pProduct (top of the diamond)
sSum (bottom of the diamond)
Ds² − 4p (must not be negative)
X1First number

Worked example

Product (top of the diamond)12
Sum (bottom of the diamond)7
s² − 4p (must not be negative)1
Second number3
  1. D=72−4×12=1
  2. X1=7+12+0=4

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.

Related calculators