Xerobit

Ratio to Fraction Converter

A ratio to fraction converter turns a comparison like 3:4 into its equivalent fraction, or reverses the process by turning a fraction back into a simplified ratio. Enter your values below and the results update immediately. Everything runs in your browser, so nothing is uploaded anywhere.

Result

  • Fraction
    3/4
  • Decimal
    0.75

How to use the ratio to fraction converter

  1. Select the conversion direction: Ratio to fraction or Fraction to ratio.
  2. Enter the first number (the left side of the ratio, or the numerator).
  3. Enter the second number (the right side of the ratio, or the denominator).
  4. Read the simplified result below the inputs.

How the ratio to fraction conversion works

A ratio written as a:b expresses the same relationship as the fraction a/b. To convert a ratio to a fraction, place the first term over the second term and simplify by dividing both by their greatest common divisor (GCD).

For example, take the ratio 12:8. The GCD of 12 and 8 is 4. Dividing both terms gives 12 / 4 = 3 and 8 / 4 = 2, so the simplified fraction is 3/2.

Going from a fraction to a ratio follows the identical logic. The fraction 6/10 has a GCD of 2, producing the simplified ratio 3:5. This ratio to fraction converter handles both directions automatically.

Handling decimals and negative numbers

Ratios often contain decimal values, such as 1.5:2.5. Before simplifying, the converter multiplies both sides by a power of 10 large enough to make them whole numbers. Here, multiplying by 10 yields 15:25. The GCD of 15 and 25 is 5, giving the final fraction 3/5.

Negative values are supported as well. A ratio of -6:9 simplifies to -2/3. The negative sign is always placed on the numerator for standard mathematical notation. If both parts are negative, they cancel out and the result is positive.

Common ratio to fraction reference table

The table below shows frequently used ratios alongside their simplified fraction equivalents. These are handy for quick lookups without needing to calculate each time.

RatioSimplified fraction
1:21/2
2:32/3
3:43/4
4:54/5
5:85/8
10:152/3
25:1001/4

Practical uses for converting ratios

Converting between ratios and fractions appears across many subjects. In cooking, a recipe might call for a flour-to-sugar ratio of 3:2. Expressing that as the fraction 3/2 makes it easier to scale the recipe up or down using multiplication.

In photography and design, aspect ratios like 16:9 describe screen dimensions. Knowing that 16:9 equals the fraction 16/9 helps when calculating exact pixel dimensions for a given width. For other unit conversions related to design, tools like mm to inches or cm to mm are also useful.

In mathematics education, students learn that probability can be expressed as either a ratio of favorable outcomes to total outcomes or as a fraction. Being able to move fluidly between these forms is a core skill.

The Euclidean algorithm for simplification

This ratio to fraction converter simplifies results using the Euclidean algorithm to find the greatest common divisor. The algorithm repeatedly replaces the larger number with the remainder of dividing the larger by the smaller until the remainder is zero. The last non-zero value is the GCD.

For instance, to find the GCD of 48 and 18: divide 48 by 18 to get a remainder of 12. Then divide 18 by 12 to get a remainder of 6. Finally, divide 12 by 6 to get a remainder of 0. The GCD is 6, so 48:18 simplifies to 8:3 or the fraction 8/3.

This method works efficiently even for very large numbers, ensuring the converter produces exact simplified results rather than floating-point approximations.

Worked examples

Each result below was produced by the same code the tool runs, so you can check your own numbers against them.

ExampleInputResult
Simple ratio 3:4Conversion direction: r2f; First part (numerator): 3; Second part (denominator): 4Fraction: 3/4; Decimal: 0.75
Simplify 12:8Conversion direction: r2f; First part (numerator): 12; Second part (denominator): 8Fraction: 3/2; Decimal: 1.5
Decimal ratio 1.5:2.5Conversion direction: r2f; First part (numerator): 1.5; Second part (denominator): 2.5Fraction: 3/5; Decimal: 0.6
Fraction 6/10 to ratioConversion direction: f2r; First part (numerator): 6; Second part (denominator): 10Simplified ratio: 3 : 5; As fraction: 3/5

FAQ

How do I convert a ratio to a fraction?

Write the first number of the ratio as the numerator and the second number as the denominator. Then simplify by dividing both by their greatest common divisor. For example, 6:8 becomes 6/8, which simplifies to 3/4.

Can a ratio have decimal numbers?

Yes. Multiply both sides by 10, 100, or another power of 10 until both are whole numbers, then simplify normally. A ratio of 1.5:2.5 becomes 15:25, which simplifies to 3:5 or the fraction 3/5.

What happens if the second part of the ratio is zero?

A ratio with a zero second part cannot be converted to a fraction because division by zero is undefined. The converter will show an error message in that case.

Is a ratio the same thing as a fraction?

They express the same mathematical relationship but use different notation. A ratio uses a colon (3:4) while a fraction uses a horizontal bar or slash (3/4). Both mean three parts for every four parts.

How do I convert a fraction back to a ratio?

Take the numerator as the first part and the denominator as the second part, then simplify. The fraction 10/15 has a GCD of 5, so it converts to the simplified ratio 2:3.

Does this tool work offline?

Yes. The ratio to fraction converter runs entirely in your browser using JavaScript. No data is sent to any server, and it continues to work without an internet connection once the page is loaded.