The Wikipedia page on it is a good place to start.

To sum up:

  • float is represented in 32 bits, with 1 sign bit, 8 bits of exponent, and 23 bits of the significand (or what follows from a scientific-notation number: 2.33728*1012; 33728 is the significand).

  • double is represented in 64 bits, with 1 sign bit, 11 bits of exponent, and 52 bits of significand.

By default, Java uses double to represent its floating-point numerals (so a literal 3.14 is typed double). It's also the data type that will give you a much larger number range, so I would strongly encourage its use over float.

There may be certain libraries that actually force your usage of float, but in general - unless you can guarantee that your result will be small enough to fit in float's prescribed range, then it's best to opt with double.

If you require accuracy - for instance, you can't have a decimal value that is inaccurate (like 1/10 + 2/10), or you're doing anything with currency (for example, representing $10.33 in the system), then use a BigDecimal, which can support an arbitrary amount of precision and handle situations like that elegantly.

Answer from Makoto on Stack Overflow
🌐
Oracle
docs.oracle.com › javase › tutorial › java › nutsandbolts › datatypes.html
Primitive Data Types (The Java™ Tutorials > Learning the Java Language > Language Basics)
The floating point types (float and double) can also be expressed using E or e (for scientific notation), F or f (32-bit float literal) and D or d (64-bit double literal; this is the default and by convention is omitted).
🌐
ZetCode
zetcode.com › java › float-types
Java Floating-Point Numbers - Complete Guide
Java offers two floating-point types: float (32-bit) and double (64-bit), both IEEE 754-based.
🌐
TheServerSide
theserverside.com › blog › Coffee-Talk-Java-News-Stories-and-Opinions › Float-vs-Double-Whats-the-difference
Java double vs float: What's the difference?
The key difference between a float and double in Java is that a double can represent much larger numbers than a float. Both data types represent numbers with decimals, but a float is 32 bits in size while a double is 64 bits.
Published: May 23, 2026
🌐
Scaler
scaler.com › home › topics › float vs double in java - difference you should know
Float Vs Double in Java - Difference You Should Know - Scaler Topics
March 27, 2024 - The main difference between Java Float and Double is their precision and range. Float is a 32-bit floating-point number, which means that it can store up to 7 decimal digits accurately while Double is a 64-bit floating-point number, which means that it can store up to 15 decimal digits accurately.
🌐
Oracle
docs.oracle.com › en › java › javase › 24 › docs › api › java.base › java › lang › Float.html
Float (Java SE 24 & JDK 24)
July 15, 2025 - The IEEE 754 standard defines binary16 as a 16-bit format, along with the 32-bit binary32 format (corresponding to the float type) and the 64-bit binary64 format (corresponding to the double type). The binary16 format is similar to the other IEEE 754 formats, except smaller, having all the usual IEEE 754 values such as NaN, signed infinities, signed zeros, and subnormals.
🌐
Educative
educative.io › blog › float-vs-double-in-java
Float vs. double in Java
In Java, float is a 32-bit single-precision floating-point type and double is a 64-bit double-precision floating-point type, with double being the default for decimal literals.
🌐
GeeksforGeeks
geeksforgeeks.org › java › java-data-types
Java Data Types - GeeksforGeeks
A 64-bit double-precision floating-point type and the default for decimal numbers. ... Size : 8 bytes (64 bits). It is recommended to go through rounding off errors in java.
Published: September 30, 2026
Find elsewhere
🌐
Gloomba
gloomba.com › en › what-is-the-size-of-a-float-in-java-*-1-point-8-bits-16-bits-32-bits-64-bits
What is the Size of a Float in Java * 1 Point 8 Bits 16 Bits 32 Bits 64 Bits: A Comprehensive Deep Dive - gloomba
July 5, 2026 - To cut straight to the chase and ... standardized value across all Java Virtual Machine (JVM) implementations. You won't find variations like 16 bits or 64 bits for the primitive `float` type....
🌐
The Floating-Point Guide
floating-point-gui.de › languages › java
The Floating-Point Guide - Floating-point cheat sheet for Java
Java has IEEE 754 single and double precision types supported by keywords: float f = 0.1f; // 32 bit float, note f suffix double d = 0.1d; // 64 bit float, suffix optional
🌐
Study.com
study.com › business courses › java programming tutorial & training
Java: Floating Point Numbers - Lesson | Study.com
October 3, 2018 - The single precision number format occupies 4 bytes, or 32 bits, in computer memory, while the double precision number format occupies 8 bytes, or 64 bits, in the memory of a computer.
🌐
EDUCBA
educba.com › home › software development › software development tutorials › top differences tutorial › java float vs double
Java float vs Double | Top 7 Beneficial Comparisons To Learn
January 11, 2024 - The range of values is beyond this ... and Values section of the Java Language Specification. The double data type is a double-precision 64-bit IEEE 754 floating-point....
Address: Unit no. 202, Jay Antariksh Bldg, Makwana Road, Marol, Andheri (East),, 400059, Mumbai
🌐
Medium
silvahansini.medium.com › floating-point-representation-in-java-da50f603b599
Floating-Point Representation in Java | by Hasini Sandunika Silva | May, 2021 | Medium | Medium
May 17, 2021 - Figure 1. shows the IEEE-754 standard representation of float data type in Java. ... Figure 1. Standard-Single Precision Representation. double: This is represented by 64-bits (8-bytes) in memory (by two words in JVM).
🌐
Oracle
docs.oracle.com › javase › 8 › docs › api › java › lang › Float.html
Float (Java Platform SE 8 )
July 21, 2026 - Java™ Platform Standard Ed. 8 ... The Float class wraps a value of primitive type float in an object.
🌐
Incus Data
incusdata.com › home › floating point numbers in java
Floating Point Numbers in Java • 2026 • Incus Data Programming Courses
July 30, 2024 - There are three basic binary floating-point formats (32, 64 or 128 bits) and two basic decimal floating-point formats (encoded with 64 or 128 bits). There are also a number of interchange formats. The Java floating point types conform to the IEEE 754 standard.
🌐
Oracle
docs.oracle.com › en › java › javase › 22 › docs › api › java.base › java › lang › Float.html
Float (Java SE 22 & JDK 22)
July 16, 2024 - The IEEE 754 standard defines binary16 as a 16-bit format, along with the 32-bit binary32 format (corresponding to the float type) and the 64-bit binary64 format (corresponding to the double type). The binary16 format is similar to the other IEEE 754 formats, except smaller, having all the usual IEEE 754 values such as NaN, signed infinities, signed zeros, and subnormals.
🌐
Medium
tarunjain07.medium.com › java-datatypes-notes-8e70959f4898
float datatypes in Java— [Notes]. **WIP | by Tarun Jain | Medium
September 5, 2022 - → To save memory, floats are commonly used in large arrays of floating-point integers. means double-size floating point · Is a 64-bit double precision IEEE 754 floating point data type ·
🌐
Baeldung
baeldung.com › home › java › java numbers › float vs. double in java
Float vs. Double in Java | Baeldung
January 4, 2025 - On modern hardware, the performance difference between float and double is negligible. Most processors are optimized for 64-bit operations, meaning double calculations may execute as quickly as the float.
🌐
KooR
koor.fr › Java › Tutorial › java_types_flottants.wp
KooR.fr - Manipulation des types flottants - Le tutoriel sur le langage de programmation Java
Le type double permet, qu'en à lui, la manipulation de flottants en double précision : du coup,les variables basées sur ce type occuperont le double d'espace en mémoire, soit 8 octets (64 bits).
🌐
Wikipedia
en.wikipedia.org › wiki › Double-precision_floating-point_format
Double-precision floating-point format - Wikipedia
2 days ago - Double-precision floating-point format (sometimes called FP64 or float64) is a floating-point number format, usually occupying 64 bits in computer memory; it represents a wide range of numeric values by using a floating radix point.