Floating Point Calculator (IEEE 754)

Convert decimal numbers to 32-bit single-precision floating point representation.

Calculator by SuperCalX: formulas, worked examples and 250+ free calculators.

Your values

Result

Enter your values and the result appears here.

Analysis

Interpretation of the current calculator output

Enter values to see detailed analysis and insights.

How to Use

Step-by-step instructions
  1. 1Enter a decimal number.
  2. 2The calculator will show the binary and hexadecimal representation.
  3. 3It also breaks down the Sign, Exponent, and Mantissa.

IEEE 754 Single Precision

Represents numbers using 1 sign bit (S), 8 exponent bits (E), and 23 mantissa bits (M).
Value = (-1)^S × 1.M × 2^(E-127)

Variables:

SSign bit (0=+, 1=-)
EExponent (biased by 127)
MMantissa (fractional part)

Example

12.5

Inputs:

Decimal:12.5

Steps:

  1. 1.Binary = 01000001010010000000000000000000
  2. 2.Sign = 0 (+)
  3. 3.Exponent = 10000010 (130 - 127 = 3)
  4. 4.Mantissa = 1.1001... (1 + 0.5 + 0.0625 = 1.5625)
  5. 5.Value = 1.5625 * 2^3 = 12.5
Result:
0x41480000

Floating Point Calculator (IEEE 754): the short answer

IEEE 754 single precision stores a number in 32 bits: 1 sign bit, 8 exponent bits (biased by 127) and 23 fraction bits, so value = (−1)^S × 1.M × 2^(E − 127). For example, 5.75 = 1.0111₂ × 2², so the exponent field is 129 and the hex pattern is 0x40B80000. 0.1 cannot be stored exactly and becomes 0x3DCCCCCD, which is about 0.100000001.

  • Single precision gives about 7 significant decimal digits; double precision about 15 to 16.
  • Largest finite float: about 3.4 × 10³⁸.
  • Special values: ±0, ±infinity and NaN.

By the SuperCalX team · Reviewed by Dr. Ahmed Mortuza Saleque, founder and editor · Last reviewed · How we check our calculators

Why 0.1 + 0.2 ≠ 0.3

Fractions like 0.1 repeat forever in binary, so they are rounded. In double precision 0.1 + 0.2 gives 0.30000000000000004. Compare floating-point results with a small tolerance instead of exact equality, and use decimal types for money.

Examples

DecimalHexSign | exponent | fraction
1.03F8000000 | 01111111 | 000…0
5.7540B800000 | 10000001 | 0111000…0
0.156253E2000000 | 01111100 | 0100000…0
−2.0C00000001 | 10000000 | 000…0

Worked examples

Encode 5.75

  1. 5.75 = 101.11 in binary = 1.0111 × 2².
  2. Exponent field = 2 + 127 = 129 = 10000001.
  3. Fraction = 0111 followed by zeros.

0 10000001 01110000000000000000000 = 0x40B80000.

Common mistakes

  • Forgetting the implicit leading 1, which is not stored for normal numbers.

Floating Point Calculator (IEEE 754) FAQ

What is the exponent bias?

127 for 32-bit floats and 1,023 for 64-bit doubles, so the stored exponent is always non-negative.

What are denormal numbers?

Very small values with an exponent field of zero and no implicit 1, which fill the gap near zero.

What is NaN?

Not a Number. In IEEE 754, it is represented by all 1s in the exponent and a non-zero mantissa.

Floating Point Calculator IEEE 754

Inspect IEEE 754 floating-point values for debugging, binary representation checks, and low-level numeric analysis.
  • Useful for debugging numeric representation issues
  • Helps inspect IEEE 754 components directly
  • Supports learning binary float behavior

Best Use Cases

Use this calculator when comparing decimal values to their stored binary form, validating serialized data, or understanding why a computed result appears slightly off due to floating-point precision limits.

Why do floating-point numbers sometimes look inaccurate?

Because many decimal values cannot be represented exactly in binary floating-point form, which introduces small precision differences.

What makes IEEE 754 important?

It is the common standard used to represent floating-point numbers in many programming languages, systems, and hardware environments.

Add this calculator to your website

Teachers, bloggers and businesses can show the Floating Point Calculator (IEEE 754) on their own pages for free. Copy this code and paste it into your page's HTML:

Please keep the credit link so readers can find the formula, worked examples and guide.