Binary Fraction Calculator

Convert decimal fractions to binary and binary fractions to decimal with step-by-step conversion process

Convert between decimal and binary fractions with step-by-step breakdown of the conversion process.

Updated June 2026 · How this works

Example calculation — edit any field to use your own numbers

Worth knowing
How It Works
The formula, explained simply

Binary fractions work like a mirror image of binary whole numbers, but instead of doubling as you move left, you halve as you move right from the decimal point. The first position after the point represents 1/2, the second represents 1/4, the third represents 1/8, and so on. This creates a fascinating limitation: while any whole number can be represented exactly in binary given enough digits, many simple decimal fractions become infinite repeating patterns.

The conversion process from decimal to binary uses repeated multiplication by 2. Start with your decimal fraction, multiply by 2, and if the result is 1 or greater, write down 1 and subtract 1 from the result. If it's less than 1, write down 0. Repeat this process with the remaining fraction until you reach zero or your desired precision. This algorithm reveals why some fractions terminate in binary while others repeat forever.

Computers store these binary fractions using IEEE floating-point format, which allocates a fixed number of bits to represent the fractional part. This is why programming languages sometimes produce unexpected results like 0.1 + 0.2 = 0.30000000000000004. The decimal 0.1 requires infinite binary digits to represent exactly, but computers must truncate after a certain point.

When To Use This
Right tool, right situation

Use binary fraction conversion when developing software that handles decimal inputs, especially financial applications where you need to understand potential precision issues. This tool helps predict which decimal values will store exactly in binary floating-point variables and which will introduce small rounding errors. It's essential for debugging unexpected calculation results in programming.

Binary fraction conversion is valuable in embedded systems programming where memory is limited and you need to determine optimal data representations. Understanding which fractions terminate in binary helps choose between fixed-point and floating-point arithmetic based on your specific numeric requirements. Educational contexts also benefit when teaching computer science concepts about number representation.

Avoid relying on binary fraction conversion for high-precision mathematical work where exact decimal representation is required. Financial calculations requiring exact penny amounts should use decimal arithmetic libraries rather than binary floating-point. Similarly, scientific calculations requiring specific decimal precision may need specialized numeric formats rather than standard binary representation.

Common Mistakes
Why results sometimes look wrong

The most common mistake is assuming that familiar decimal fractions like 0.1 or 0.3 can be represented exactly in binary. This leads to confusion when programming calculations don't produce expected results. The error stems from thinking all number systems represent the same values with equal precision, when in fact each base has its own set of exactly representable numbers.

Another frequent error occurs when manually converting binary fractions to decimal by treating each digit as if it were in the ones place. For instance, seeing 0.101 and calculating 1+0+1=2 instead of recognizing that these positions represent 1/2 + 0/4 + 1/8. This mistake happens because people apply whole number binary conversion rules to fractional positions without adjusting for the negative powers of 2.

Precision errors compound when performing multiple conversions or arithmetic operations. Converting from decimal to binary and back to decimal often introduces small discrepancies due to rounding at each step. This is particularly problematic in financial calculations where exact values matter, leading developers to incorrectly blame their conversion tools rather than understanding the fundamental limitations of binary fraction representation.

The Math
Worked examples and deeper derivation

The mathematical foundation of binary fractions rests on the fact that any number can be expressed as a sum of powers of its base. In decimal, 0.75 equals 7×10⁻¹ + 5×10⁻². In binary, the same number becomes 1×2⁻¹ + 1×2⁻², which we write as 0.11. This positional notation system means that binary can only exactly represent fractions whose denominators are powers of 2.

When converting decimal fractions to binary, you're essentially finding which negative powers of 2 sum to your target number. The algorithm of repeated multiplication by 2 systematically determines each binary digit. If multiplying the current remainder by 2 produces a result ≥ 1, that position gets a 1; otherwise, it gets a 0. This process either terminates when the remainder becomes zero or continues infinitely for non-terminating fractions.

The convergence properties of this conversion reveal deep mathematical truths about rational numbers. A decimal fraction will terminate in binary if and only if, when expressed in lowest terms, its denominator contains no prime factors other than 2. For example, 1/5 will never terminate in binary because 5 is prime and not a power of 2, while 3/8 terminates because 8 = 2³.

Converting 0.625 to Binary
Decimal: 0.625, Precision: 8 places
Result is 0.101 in binary. The fractional part 0.625 converts by repeatedly multiplying by 2: 0.625 × 2 = 1.25 (write 1), 0.25 × 2 = 0.5 (write 0), 0.5 × 2 = 1.0 (write 1). This gives us 0.101, which equals 1/2 + 1/8 = 0.625.
Converting Binary 0.1101 to Decimal
Binary: 0.1101
Result is 0.8125 in decimal. Each binary digit represents a power of 2: 0.1 = 1/2 = 0.5, 0.01 = 1/4 = 0.25, 0.001 = 1/8 = 0.125. Adding these: 0.5 + 0.25 + 0.125 = 0.8125.
Repeating Binary Fraction
Decimal: 0.1, Precision: 8 places
Result is 0.00011001 (truncated). The decimal 0.1 cannot be exactly represented in binary, creating a repeating pattern. This demonstrates why floating-point numbers in computers sometimes have precision issues.
Expert Unlock
The thing most explanations skip

The key insight professionals understand is that binary fraction representation errors are not random but predictable based on the prime factorization of denominators. Any fraction in lowest terms will terminate in binary if and only if its denominator is a power of 2. This mathematical certainty allows expert developers to predict exactly which decimal inputs will cause precision issues before writing any code.

Why do some decimal fractions repeat infinitely in binary?

Why can't 0.1 be exactly represented in binary?
Binary fractions can only represent numbers that are sums of powers of 1/2, like 1/2, 1/4, 1/8. Since 0.1 decimal equals 1/10, and 10 is not a power of 2, it creates a repeating pattern in binary: 0.000110011001... This is why computers sometimes show tiny rounding errors with decimal calculations.
What decimal fractions convert exactly to binary?
Decimals that can be written as fractions with denominators that are powers of 2 convert exactly. Examples: 0.5 (1/2), 0.25 (1/4), 0.125 (1/8), 0.75 (3/4), 0.875 (7/8). Any combination of these, like 0.625 (5/8), also converts exactly.
How do I read binary decimal places?
Each position after the binary point represents a negative power of 2. The first position is 1/2 (0.5), second is 1/4 (0.25), third is 1/8 (0.125), and so on. To convert, add up the decimal values where you see a 1. For example, 0.101 = 0.5 + 0.125 = 0.625.

Need something this doesn't cover?

Suggest a tool — we'll build it →