Ratio Simplifier Formula

Understand the math behind the ratio simplifier. Each variable explained with a worked example.

Formulas Used

Gcd Val

gcd_val = gcd(round(abs(a)), round(abs(b)))

Simplified A

simplified_a = round(abs(a)) / gcd(round(abs(a)), round(abs(b)))

Simplified B

simplified_b = round(abs(b)) / gcd(round(abs(a)), round(abs(b)))

Decimal Ratio

decimal_ratio = b != 0 ? a / b : 0

Variables

VariableDescriptionDefault
aFirst Number12
bSecond Number8

How It Works

How to Simplify a Ratio

Method

1. Find the GCD (greatest common divisor) of both numbers 2. Divide both numbers by the GCD

Example: 12:8

  • GCD(12, 8) = 4
  • 12/4 : 8/4 = 3:2
  • Worked Example

    Simplify the ratio 12:8.

    a = 12b = 8
    1. 01GCD(12, 8) = 4
    2. 0212/4 = 3
    3. 038/4 = 2
    4. 04Simplified ratio: 3:2
    5. 05Decimal: 12/8 = 1.5

    Ready to run the numbers?

    Open Ratio Simplifier