0.1 + 0.2 = 0.3

Scroll down to continue

How do computers store numbers?

While humans typically use base 10 (decimal system) to process numbers, computers operate using base 2. This system is known as "binary," where the only two values are 0 and 1.

This works very well for computers because they only have to store whether a "bit" (one unit of information) is on or off.

This is Gottfried Wilhelm Leibniz, he was a German philosopher, mathematician, and logician who developed the binary number system in 1703. He recognized binary's potential for simplifying calculations and even envisioned a mechanical computing device based on it.

Fixed-point vs floating-point

111101010110111
0
10011110
01110110100000011100110

This is a floating-point number (IEEE 754-2019), it is the most common standard for representing numbers. Floating-point numbers have the position of the decimal encoded along with the rest.
ArrowThis is a fixed-point number, it can either be very large, or very precise

3.14

You're probably thinking, "how much does that actually represent?"

3.1400001049041748046875

So what is 0.1+0.2?

0.100000001490116119384765625+0.2000000029802322387695312500.300000004470348358154296875

Why does this matter?

Bank

Good Morning,

Elliott

Today is Thursday, March 19, 2026

Quick Actions

Account summary

Current Balance
$0.20
Make a Deposit

How can we fix it?

The way that banks and other financial institutions compute numbers is either by rounding or by truncating. One other method is to raise numbers to integers (e.g. 3.14 to 314). However, that relies on the number having a fixed decimal place.

Issues with decimals are inherently embedded in the binary system. Some other standards have been made to store numbers in base 10 (see IEEE 754-2008), but those take up much more space, and are way slower.

The best way to fix this would be to fundamentally change how computers work.

Fin