Excel Convert Between Fraction and Decimal
In this article
This guide explains how to convert fractions to decimals and decimals to fractions in Microsoft Excel, covering both the quick formatting method and the more flexible TEXT function approach. You'll learn the exact steps, see worked examples, and understand when to use each method to get the result you need.
in value | Value to convert | - | 1.5 | 0 sel mode | Conversion direction | Fraction to Decimal=1, Decimal to Fraction=2 | 1 out result | Result | - | if(mode==1, value, value) | 4
Formula
Excel does not have a single built-in function that directly converts between a fraction and a decimal. Instead, you use either number formatting or the TEXT function. The underlying math is simple division: a fraction like 3/4 means 3 divided by 4, which equals 0.75. To go the other way, you express a decimal as a fraction with a power of 10 in the denominator, then simplify. For example, 0.75 = 75/100 = 3/4.
In Excel, the two main methods are:
- Number Formatting: Use the "Fraction" category in the Format Cells dialog. This changes the display of a decimal to a fraction (e.g., 0.75 becomes ¾) but the underlying cell value remains a decimal.
- TEXT Function: Use
=TEXT(value, "# ?/?")to return a text string that shows the fraction. This is useful when you need the fraction as text for concatenation or reporting.
For the reverse (decimal to fraction), you can also use the TEXT function with the same format codes. For fraction to decimal, simply enter the fraction as a formula (e.g., =3/4) or format a cell that contains a fraction as a decimal.
Worked Example
Let's use the default value of 1.5 and convert it to a fraction using the TEXT function.
- In cell A1, enter
1.5. - In cell B1, enter the formula:
=TEXT(A1, "# ?/?"). - Press Enter. The result is
1 1/2(one and one-half).
This works because Excel interprets the format code # ?/? as: display the whole number part (#), then a space, then the fraction with a single-digit numerator and denominator (?/?). The value 1.5 is exactly 1 + 0.5, and 0.5 as a fraction is 1/2, so the result is 1 1/2.
How to Convert a Fraction to a Decimal in Excel
If you have a fraction written as text (e.g., "3/4") in a cell, you cannot simply format it as a decimal because Excel sees it as text, not a number. To convert it, you need to evaluate the fraction. The simplest way is to use a formula that splits the numerator and denominator:
- Assume the fraction is in cell A1 as text like "3/4".
- Use the formula:
=LEFT(A1, FIND("/", A1)-1) / RIGHT(A1, LEN(A1)-FIND("/", A1)). - This extracts the number before the slash as the numerator and the number after as the denominator, then divides them.
- Format the result cell as a number with the desired decimal places.
If the fraction is a real Excel fraction (entered as a formula like =3/4), then simply changing the cell format to "Number" will display 0.75.
How to Convert a Decimal to a Fraction in Excel
To display a decimal as a fraction, you have two main options:
- Format Cells: Right-click the cell, choose Format Cells, then select the "Fraction" category. You can choose from several types (e.g., up to one digit, up to two digits, halves, quarters, etc.). This only changes the display; the cell still contains the decimal.
- TEXT Function: Use
=TEXT(A1, "# ?/??")to get a text fraction. The number of question marks controls the denominator size. For example,"# ?/?"gives fractions with denominators up to 9, while"# ??/??"gives denominators up to 99.
If you need an exact fraction (not rounded), you may need to use a more complex formula or an add-in, because Excel's fraction formatting rounds to the nearest fraction based on the denominator limit.
Common Mistakes and How to Avoid Them
- Mistake: Using TEXT when you need a number. The TEXT function returns text, so you cannot use the result in further calculations. If you need a numeric fraction, use the division formula instead.
- Mistake: Forgetting that fractions are displayed, not stored. When you format a cell as a fraction, the underlying value is still a decimal. If you copy the cell and paste it elsewhere, you may get the decimal, not the fraction, unless you also copy the format.
- Mistake: Assuming Excel simplifies fractions automatically. Excel does simplify fractions in the display, but only to the extent allowed by the denominator limit. For example, 0.75 with a one-digit denominator shows as 3/4, but 0.333... shows as 1/3 only if you choose a denominator limit that includes 3.
Using the TEXT Function for Custom Fractions
The TEXT function is powerful because you can control the denominator size. Here are some format codes:
"# ?/?"– up to one digit denominator (e.g., 1/2, 3/4)."# ??/??"– up to two digits (e.g., 12/25)."# ???/???"– up to three digits (e.g., 123/456)."# ?/2"– always halves (e.g., 1/2, 3/2)."# ?/4"– always quarters (e.g., 1/4, 3/4).
You can also use the TEXT function to convert a fraction to a decimal if you have the fraction as text, but that requires a more complex formula (as shown earlier).
Alternatives: Using Formulas for Exact Conversion
If you need an exact decimal from a fraction (not a rounded display), you can use the division formula. For example, if you have the numerator in cell A1 and the denominator in B1, use =A1/B1. This gives a true numeric result that you can format to any number of decimal places.
For decimal to exact fraction, Excel's built-in formatting is limited. If you need the exact fraction (e.g., 1/3 instead of 0.3333), you might use a custom VBA function or a more advanced formula that finds the greatest common divisor. However, for most everyday tasks, the formatting options are sufficient.
Frequently Asked Questions
How do I convert a fraction to a decimal in Excel without a formula?
If the fraction is typed as text (e.g., "3/4"), you cannot convert it without a formula because Excel treats it as text. If the fraction is a real number (e.g., you typed =3/4), you can simply change the cell format to "Number" to see the decimal. For text fractions, use the LEFT/RIGHT or a similar formula to split and divide.
How do I convert a decimal to a fraction in Excel without using TEXT?
You can use the Format Cells dialog: select the cell, press Ctrl+1, go to the Number tab, choose "Fraction", and pick the type. This changes the display to a fraction, but the cell value remains decimal. If you need the fraction as text, you must use the TEXT function.
Why does Excel show 0.75 as 3/4, but 0.333 as 1/3?
Excel's fraction formatting rounds to the nearest fraction based on the denominator limit you choose. For 0.75, with a one-digit denominator, the closest fraction is 3/4. For 0.333, the closest fraction with a one-digit denominator is 1/3 (since 0.333 is approximately 1/3). If you choose a larger denominator limit, you may get a more precise fraction like 333/1000.
Can I convert a fraction to a decimal and keep it as a number?
Yes, if the fraction is stored as a number (e.g., you entered =3/4), just change the cell format to "Number" and it will display 0.75. If the fraction is text, you need to use a formula to extract the numerator and denominator and divide them, which yields a numeric result.
How do I display a fraction like 1/2 instead of 0.5 in Excel?
Select the cell, press Ctrl+1, choose "Fraction" under Number, and select the type that matches your denominator (e.g., "Up to one digit" for 1/2). The cell will display 1/2, but the underlying value is still 0.5. To get a text fraction, use =TEXT(A1, "# ?/?").