Convert decimals to fractions (online calculator / converter)

The frac command converts a decimal to a fraction. Input frac 0.25 in the form above and you get 1/4 like this.

Decimal to fraction

In this case, frac is a command and 0.25 is the argument of it. The output is 1/4. The given decimal is in green and the result fraction is in red. This online calculator can convert several decimals to fractions at a time if you input them separated by space in the form.

Several fractions

In this case, the command takes four decimals as arguments and all numbers are converted to fractions at one time. The calculator can convert negative decimals to fraction.

Convert integers to fractions

You can convert an integer like 0, 1, -2 to a fraction even though we can easily do it without a calculator.

Integers to fractions

All integers are converted to fractions with one denominators.

All decimals with finite digits can be converted to fractions but decimals with infinite digits like Euler number, pi (3.14...), and the square root of 2 can't be so.

Arithmetic

Calculator