Decimal Calculator

Convert between decimals, fractions, and percentages in either direction, and see all three representations of any number.

Decimal Calculator — input your values

What do you want to convert?
Used for decimal modes. Up to ten decimal places are read.
Used in fraction mode.
Cannot be zero.

What does this math calculator do?

The decimal calculator converts any finite decimal into its exact fraction form (simplified to lowest terms) and its percentage form, and it converts fractions into their decimal and percentage equivalents. All three representations of the number are shown together so you can compare them at a glance.

The conversion works by scaling: a decimal with k digits after the point is rewritten as a fraction with denominator 10^k, then reduced using the greatest common divisor. The step-by-step working mirrors the method taught in schools, making the tool useful for homework and revision.

Formula and variables

0.d1d2...dk = d1d2...dk / 10^k · decimal × 100 = percent · percent ÷ 100 = decimal
SymbolMeaning
kNumber of digits after the decimal point
10^kScaling factor that removes the decimal point
fractionSimplified by dividing numerator and denominator by their gcd

Worked example

Convert 0.25 to a fraction and a percentage.

  1. 0.25 has two decimal digits, so 0.25 = 25/100.
  2. gcd(25, 100) = 25, so 25/100 = 1/4.
  3. 0.25 × 100 = 25%.

Answer: 0.25 = 1/4 = 25%.

Tips and common mistakes

Tips

  • To convert a percentage to a fraction, write it over 100 and simplify: 40% = 40/100 = 2/5.
  • A fraction converts to a terminating decimal only if its simplified denominator has no prime factors other than 2 and 5.
  • Move the decimal point two places to the right (and add a % sign) to convert any decimal to a percentage.
  • For a percentage like 33.3%, the exact fraction is 333/1000 — keep the full decimal, not a rounded value.

Common mistakes to avoid

  • Rounding early and then converting, which produces a fraction that is close but not exact.
  • Forgetting to simplify the resulting fraction to lowest terms.
  • Writing 0.5 as 50 when converting to a percentage instead of 50%.

Decimal Calculator — frequently asked questions

How do I convert a decimal to a fraction?

Count the digits after the decimal point, write the decimal over 10 to that power, and simplify. For 0.375: 375/1000 = 3/8.

How do I convert a fraction to a decimal?

Divide the numerator by the denominator. For 3/4, 3 ÷ 4 = 0.75.

How do I convert a decimal to a percent?

Multiply by 100. So 0.75 becomes 75%. To go the other way, divide the percentage by 100.

Can this calculator handle repeating decimals?

It converts up to ten decimal places exactly. A value like 0.3333333333 is a close approximation of 1/3, which it reports as 3333333333/10000000000.

Why is 0.1 + 0.2 not exactly 0.3 in my code?

Because computers store decimals in binary floating point, where 0.1 and 0.2 are repeating fractions. The exact decimal is 0.30000000000000004. This calculator displays rounded values.

What is a terminating decimal?

A decimal that ends after a finite number of digits, like 0.25. It always represents a fraction whose simplified denominator uses only the prime factors 2 and 5.