Fraction Calculator

Numerator Denominator Base

There are interesting and unexpected patterns to be observed in the decimal equivalents of many fractions. Unfortunately, most calculators are limited to fewer than 16 digits, which makes it difficult to study the properties of decimals that have longer periods. In general, one must simply calculate the decimal by hand, which can be tedious and inaccurate at times.


Decimals come in a variety of flavors.

  • There are those that have a single, non-repeating pattern. Examples include 1/2 (.5), 1/4 (.25), 5/8 (.625), 1/1000 (.001).
  • There are those that have a simple repeating pattern, which can be one or more digits in length. Examples include 1/3 (.3), 1/31 (.032258064516129), 1/27 (.037). I use dark blue to indicate that the digits repeat.)
  • Among those that have a repeating pattern, many exhibit a characteristic to which I refer as 9s complement: the pattern has an even number of digits; and the digits in the first half, added to the digits in the second half, equals a number composed of all 9s. Examples include 1/7 (.142857), 3/11 (.27), 1/17 (.0588235294117647). (Dark blue or orange indicates that the digits repeat. The digits in the first half of the decimal are dark blue, and the digits in the second half are orange. Add the two halves, and the result is all 9s.)
  • There are also hybrids: decimals in which a non-repeating pattern is followed by a pattern that repeats. Examples include 1/6 (.16), 5/12 (.416), 3/28 (.10714285).

If you have any computer programming background, you are acquainted with the binary, octal, and hexadecimal systems. This application will allow you to evaluate fractions in those, and other, number bases. It might of interest to learn, for example, that, just as fractions in base 10 can exhibit the 9s complement characteristic, fractions in octal can exhibit 7s complement.

To use this application, fill in the numerator and the denominator in the form above, make sure the base set to the one you want to use, and click the Calculate button. Currently, the application does not check your entry, so make sure the numbers you enter are consistent with the base (e.g., 0-9 for base 10).

You can use a hyphen to enter a range of numbers for the numerator.