Floating Point Precision Calculator
IEEE 754 floating-point formats trade exactness for range using a sign bit, an exponent, and a significand. The significand bit count sets the precision: how many decimal digits are reliable and how small the gap between adjacent values is (machine epsilon). Pick a standard format (half, single, or double) or enter a custom significand and exponent bit count. This calculator reports the total bits, the decimal digits of precision, the machine epsilon, and the approximate largest finite value, all from the IEEE 754 definitions.
IEEE 754 precision formula
Effective significand p = stored bits + 1 (implicit bit)
Total bits = 1 sign + exponent bits + stored significand bits
Decimal digits = p * log10(2)
Machine epsilon = 2 ^ (1 - p)
Max finite = 2 ^ (2^(exp-1)) approx (largest normalized magnitude)
The implicit leading 1 bit adds one bit of precision to normalized numbers, so single precision has 24 effective significand bits.
Floating point context
- Half precision: 16 bits total, about 3.3 decimal digits; used in graphics and machine learning.
- Single precision: 32 bits, about 7.2 decimal digits; the C float type.
- Double precision: 64 bits, about 15.95 decimal digits; the JavaScript number and C double type.
- Machine epsilon bounds the relative rounding error of a single operation.
- Decimal fractions like 0.1 have no exact binary form, causing familiar rounding surprises.
Floating point precision calculator: frequently asked questions
How many decimal digits can a float store?
An IEEE 754 binary format with p bits of significand (mantissa) carries about p times log base 10 of 2 decimal digits. Single precision has 24 significand bits including the implicit bit, giving about 7.2 decimal digits; double precision has 53 bits, giving about 15.95 digits.
What is machine epsilon?
Machine epsilon is the difference between 1 and the next representable number above it, equal to 2 raised to the power of one minus the significand bit count. For single precision it is about 1.19e-7, and for double precision about 2.22e-16. It bounds the relative rounding error.
What are the standard IEEE 754 formats?
Half precision uses 16 bits (1 sign, 5 exponent, 10 stored significand). Single precision uses 32 bits (1, 8, 23). Double precision uses 64 bits (1, 11, 52). The significand always has one extra implicit leading bit for normalized numbers, so its effective precision is one more than the stored bits.
Why does 0.1 plus 0.2 not equal 0.3 exactly?
Because 0.1, 0.2, and 0.3 cannot be represented exactly in binary floating point, just as one third cannot be written exactly in decimal. The tiny rounding errors at each step accumulate, leaving a result like 0.30000000000000004. This is a consequence of finite significand bits, defined by IEEE 754.
How is the largest representable value found?
It is approximately 2 raised to the power of one more than the maximum exponent, scaled by the significand. For double precision the maximum finite value is about 1.80e308, and for single precision about 3.40e38. Beyond that the format represents infinity.
Official sources
- IEEE: IEEE 754 Standard for Floating-Point Arithmetic.
- NIST DLMF: NIST Digital Library of Mathematical Functions (logarithms).
Reviewed by the CalculatorHub team, edited by James Graham, 17 June 2026. See our methodology.