terican

Last verified · v1.0

Calculator · math

Ratio Of Two Numbers Calculator

Calculate the ratio of two numbers (A:B) instantly. Enter any two values to get the simplified ratio, decimal form, and step-by-step breakdown.

FreeInstantNo signupOpen source

Inputs

Ratio (A ÷ B)

Explain my result

0/3 free

Get a plain-English breakdown of your result with practical next steps.

Ratio (A ÷ B)

The formula

How the
result is
computed.

What Is the Ratio of Two Numbers?

A ratio expresses the quantitative relationship between two numbers, showing how many times one value contains or is contained within the other. Written as A:B or as the fraction A/B, a ratio answers the question: for every A units, how many B units exist? According to Chapter 6: Ratio and Proportion (HUFSD Algebra), a ratio is a comparison of two quantities by division, and the result is typically expressed in its simplest form using the smallest possible whole numbers.

The Core Formula

The ratio R of two numbers A and B is calculated as:

R = A ÷ B

Where:

  • A (antecedent) — the first number in the ratio, representing the quantity being compared
  • B (consequent) — the second number in the ratio; this value cannot be zero, as division by zero is mathematically undefined
  • R — the resulting ratio, expressed as a decimal, fraction, or in simplified A:B notation

How to Simplify a Ratio

After computing R = A/B, simplify the ratio by dividing both A and B by their greatest common divisor (GCD). For example, the ratio 12:8 simplifies to 3:2 because GCD(12, 8) = 4. The simplified form preserves the proportional relationship while using the smallest whole numbers possible.

Step-by-Step Worked Example

  • Given A = 15 and B = 25
  • Compute R = 15 ÷ 25 = 0.60
  • GCD(15, 25) = 5
  • Simplified ratio: 15/5 : 25/5 = 3:5

Real-World Applications

Finance and Business

Financial analysts rely on ratios daily. A company reporting $500,000 in revenue against $100,000 in net profit has a profit-to-revenue ratio of 500,000:100,000, which simplifies to 5:1 — meaning every five dollars of revenue yields one dollar of profit. Debt-to-equity, current ratio, and price-to-earnings (P/E) ratios all apply the same R = A/B formula.

Medicine and Clinical Research

According to The Proper Calculation of Risk Ratios: How and Why (PMC, NIH), risk ratios compare the probability of an outcome in an exposed group (A) to the probability in an unexposed group (B). A risk ratio of 2.5 means the exposed group is 2.5 times more likely to experience the outcome. Precision in this calculation directly shapes evidence-based clinical decisions and public health policy.

Cooking and Recipe Scaling

A classic bread recipe uses a flour-to-water ratio of 5:3 (A = 5 cups flour, B = 3 cups water). Scaling up to 15 cups of flour requires exactly 9 cups of water, preserving the 5:3 ratio. The ratio of two numbers calculator handles these proportional adjustments instantly, eliminating manual arithmetic errors.

Engineering and Science

Gear ratios determine mechanical advantage in machinery. A drive gear with 60 teeth (A) meshing with a driven gear of 20 teeth (B) produces a gear ratio of 60:20 = 3:1, meaning the driven gear rotates three times for every single rotation of the drive gear. Engineers at NASA apply analogous ratio analysis in isentropic flow equations, comparing pressure and temperature states to characterize aerodynamic performance.

Equivalent Ratios and Proportions

Two ratios are equivalent when they simplify to the same value. The ratios 2:3, 4:6, and 8:12 are all equivalent because each reduces to 2:3. Proportions — equations that set two ratios equal — underlie cross-multiplication, map scaling, and unit conversion. As covered in MAT 107: Technical Mathematics (YCCC Student Success Commons), proportional reasoning is central to applied mathematics across every quantitative discipline, from construction blueprints to pharmaceutical dosing.

Part-to-Part vs. Part-to-Whole Ratios

A part-to-part ratio compares one subset to another: 3 red marbles to 5 blue marbles = 3:5. A part-to-whole ratio compares a subset to the total: 3 red marbles out of 8 total = 3:8. Both forms use R = A/B; the interpretation depends entirely on what A and B represent in context. Identifying the correct ratio type is the essential first step before applying the formula, as outlined in HUFSD Chapter 6: Ratio and Proportion.

Reference

Frequently asked questions

What is the ratio of two numbers?
The ratio of two numbers A and B is a comparison showing how many times A contains B, expressed as A:B or as the fraction A/B. For example, the ratio of 10 to 4 is 10:4, which simplifies to 5:2, meaning for every 5 units of A there are 2 units of B. Ratios describe proportional relationships across finance, science, cooking, and medicine.
How do you calculate the ratio of two numbers step by step?
Divide the first number A by the second number B to get the decimal form. Then find the GCD of A and B and divide both by it to produce the simplified ratio. Example: A = 18, B = 24. GCD = 6. Simplified ratio = 18/6 : 24/6 = 3:4. The decimal form is 18 ÷ 24 = 0.75. Always verify B is non-zero before dividing.
Can the second number (B) in a ratio be zero?
No. The second number B, called the consequent, cannot be zero. Division by zero is mathematically undefined — no real number R satisfies R × 0 = A for any non-zero A. Any valid ratio calculator will reject zero as a denominator and flag the input as invalid. Always ensure B is a non-zero value before computing any ratio.
What is the difference between a ratio and a proportion?
A ratio is a single comparison of two quantities expressed as A:B — for example, 3:4. A proportion is an equation stating that two ratios are equal: A/B = C/D, such as 3/4 = 6/8. Ratios describe a relationship; proportions use that relationship to solve for an unknown quantity via cross-multiplication. The ratio must be correctly calculated before any proportion can be solved.
How do you simplify a ratio of two numbers?
Divide both numbers by their greatest common divisor (GCD). Use the Euclidean algorithm or list the factors of each number to find the GCD. Example: ratio 36:48 — GCD(36, 48) = 12, so 36/12 : 48/12 = 3:4. A fully simplified ratio uses the smallest whole numbers that still preserve the exact proportional relationship between A and B.
What are common real-world uses of the ratio of two numbers?
Ratios appear in finance (debt-to-equity, price-to-earnings), medicine (risk ratios comparing treatment outcomes, as documented by PMC/NIH), cooking (ingredient proportions such as 2:1 sugar to butter), engineering (gear ratios, compression ratios in engines), and cartography (map scale ratios like 1:50,000). Every field that compares two quantities relative to each other relies on the fundamental formula R = A ÷ B.