Ratio to fraction converter

Fraction: enter A and B above.

Decimal: waiting on both numbers.

Percentage: waiting on both numbers.

Part-to-whole: waiting on both numbers.

Ratio to Fraction

Turn a ratio A:B into a fraction, a decimal, and a percentage, with the part-to-whole view shown alongside.

When is a ratio the same as a fraction?

A ratio A:B corresponds to the fraction A/B only when you are comparing the first part directly to the second part. That is the part-to-part reading, and it is what most people mean when they say "write the ratio as a fraction."

But if A and B are the two parts that make up a whole, then the whole is A + B, and the first part as a share of that whole is A/(A+B), not A/B. The converter above always shows both results, clearly labeled, so you can use the one that actually answers your question. Decimals in the input are handled honestly: both sides are scaled up by a power of ten to clear the decimal places, then reduced by the greatest common divisor.

Worked example: 3:5

  1. Part-to-part fraction: 3/5, already in lowest terms because 3 and 5 share no divisor.
  2. Decimal: 3 / 5 = 0.6.
  3. Percentage: 0.6 x 100 = 60%.
  4. Part-to-whole: the whole is 3 + 5 = 8, so 3/8 = 0.375 = 37.5%.

Notice the difference: 3 compared to 5 is 3/5, but 3 compared to the whole (3 + 5) is 3/8. Both are correct answers to different questions.

Related tools

Need to solve a full proportion instead of converting one? Theratio solver on the homepage fills in the missing value of A : B = C : D, and it also simplifies and scales ratios. Working with screen dimensions? Theaspect ratio calculator solves pixel widths and heights from a ratio.

Frequently asked questions

Is the ratio A:B the same as the fraction A/B?

Only when you mean part compared to part. The ratio 3:5 as a part-to-part comparison is the fraction 3/5. But if 3 and 5 are the two parts that make up a whole, the first part is 3/(3+5) = 3/8 of the whole, not 3/5.

Can I convert a ratio that has decimals?

Yes. Inputs like 1.5:2 are scaled up to whole numbers first (15:20), then reduced by the greatest common divisor, so you get the fraction 3/4.

How many decimal places do you show?

The decimal and percentage are rounded to 6 significant digits with trailing zeros trimmed, so 1:3 shows as 0.333333 and 33.3333%.

Is my data stored anywhere?

No. Everything runs locally in your browser with plain JavaScript. Nothing you type is sent to a server or saved.