Fractional number base converter

Enter a number with a point and pick the two bases to see whether the fraction ends or repeats. It shows, for example, why 0.1 has no finite binary form.

Loading the tool…

Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.

How to use it

  1. Enter number, from base, to base and maximum digits after the point.
  2. The result appears straight away and updates as you edit.
  3. Copy the result, or copy a link that keeps the same values to share it.

How it is calculated

The integer part uses repeated division. The fraction uses repeated multiplication: multiply by the output base and the integer part is the next digit. The fraction is kept as an exact ratio, and when a remainder recurs the cycle is shown in brackets: 0.0(0011) means 0.000110011 with 0011 repeating.

Example

Inputs: Number = 0.1, From base = Base 10 (decimal), To base = Base 2 (binary), Maximum digits after the point = 40. Result: Result in base 2: 0.0(0011); Fraction type in the new base: Repeating; Length of the repeating block: 4.

0.1
0.0(0011)

Limits and caveats

  • If the cycle is longer than the chosen limit, the result is cut without brackets; raise the limit to see it.
  • Input up to 400 digits; the point can be a dot or the Arabic decimal mark ٫.

Questions about this tool

Why can't 0.1 be written exactly in binary?

0.1 is 1/10, and the factor 5 in 10 does not divide base 2, so the fraction repeats forever: 0.0(0011). That is where small rounding errors in computers come from.

When does a fraction terminate in a given base?

A reduced fraction terminates when every prime factor of its denominator also divides the base. For example 1/4 ends in base 12 (0.3) because 2 divides 12, while 1/3 repeats in decimal.

What do the brackets in the result mean?

The digits inside the brackets repeat forever. 101.(1) in ternary means 101.111 with the 1 repeating, which equals 10.5 in decimal.