A BigDecimal is an exact way of representing numbers. A Double has a certain precision. Working with doubles of various magnitudes (say d1=1000.0 and d2=0.001) could result in the 0.001 being dropped altogether when summing as the difference in magnitude is so large. With BigDecimal this would not happen.

The disadvantage of BigDecimal is that it's slower, and it's a bit more difficult to program algorithms that way (due to + - * and / not being overloaded).

If you are dealing with money, or precision is a must, use BigDecimal. Otherwise Doubles tend to be good enough.

I do recommend reading the javadoc of BigDecimal as they do explain things better than I do here :)

Answer from extraneon on Stack Overflow
🌐
Reddit
reddit.com › r/java › double vs bigdecimal in financial programming
r/java on Reddit: Double vs BigDecimal in financial programming
May 22, 2018 -

Everyone says that BigDecimal should be used when dealing with money but it’s much slower and takes more memory than double. I would think this would be especially important in high frequency low-latency applications like trading. Do people actually use BigDecimal in such systems or do they use doubles with some kind of workaround to handle the precision issue?

Edit: I do have experience working on trading and risk systems and I see doubles used much more often than BigDecimal so I was curious to see if this is more common in actual practice. Most of the systems I worked on only need precision to the penny so I wonder if that’s the reason?

Also, BigDecimal is a pain to use and code written with it look much uglier than plain doubles.

🌐
Frankel
blog.frankel.ch › bigdecimal-vs-double
double, BigDecimal, or Fixed-Point?
June 14, 2026 - BigDecimal operations allocate ... scale and precision metadata at every step. Compared to double, which compiles down to a single FPU instruction, the overhead is enormous....
Discussions

optimization - What to do with Java BigDecimal performance? - Stack Overflow
I write currency trading applications ... "Use BigDecimal!" — you might say. I do. But now I have some code where performance is an issue, and BigDecimal is more than 1000 times (!) slower than double primitives.... More on stackoverflow.com
🌐 stackoverflow.com
java - Can we replace using Double with BigDecimal completely, any performance overhead? - Stack Overflow
I want to know if there will be any performance issues if I use BigDecimal for all the variables? Can I save execution time if I opt for choice 1? Which way is best? (I am using java 6) ... In Java 9, there will be JavaMoney API with JSR 354. ... So, mostly if I am reading the data and not doing many calculations then I can use either BigDecimal or Double... More on stackoverflow.com
🌐 stackoverflow.com
September 29, 2015
Double vs BigDecimal in financial programming

Use long or big decimal. Performance problems will most probably arise elsewhere before you factor a big decimal as the culprit

More on reddit.com
🌐 r/java
105
44
May 22, 2018
Retaining BigDecimal Precision in JSON Without Converting to String
Well, technically speaking JSON does support any precision. All JSON cares about is "sequence of numeric digits." Its just that implementations in languages like Javascript do not, so for "compatibility" people generally use strings, since those can be massaged after the read step. More on reddit.com
🌐 r/rust
14
21
November 23, 2023
🌐
Baeldung
baeldung.com › home › java › java numbers › java double vs. bigdecimal
Java Double vs. BigDecimal | Baeldung
January 8, 2024 - Java’s Double is more compact, which results in more efficient memory usage. On the other hand, BigDecimal’s strength in arbitrary-precision arithmetic entails higher memory consumption. This can have implications for our application performance and scalability, especially in memory-intensive contexts.
🌐
Vanillajava
blog.vanillajava.blog › 2024 › 11 › overview-many-developers-consider.html
Why double Still Outperforms BigDecimal: A Decade-Long Performance Comparison
December 19, 2024 - For the most part, double provides 15 digits of precision, which is more than enough for typical monetary values. If these prices had 17 digits, BigDecimal might be more appropriate.
🌐
Java Code Geeks
examples.javacodegeeks.com › home › java development › core java
Java Double vs. BigDecimal - Java Code Geeks
February 9, 2024 - The double type, being a primitive data type, offers fast performance and is well-suited for scenarios where a slight loss of precision is acceptable, such as in scientific simulations.
🌐
JA-VA Code
java-performance.info › home › bigdecimal vs. double in financial calculations
BigDecimal vs. Double: Precision for Financial Accuracy
October 9, 2023 - Example: Complex scientific simulations where absolute precision is less critical than computational speed. Efficiency: Double offers faster performance compared to BigDecimal due to hardware support for floating-point operations;
Find elsewhere
🌐
Foojay
foojay.io › home › java › double, bigdecimal, or fixed-point? precision, performance, and sane choices for numbers in java
double, BigDecimal, or Fixed-Point? Precision, Performance, and Sane Choices for Numbers in Java | Foojay.io
June 24, 2026 - BigDecimal operations allocate ... scale and precision metadata at every step. Compared to double, which compiles down to a single FPU instruction, the overhead is enormous....
🌐
Medium
medium.com › @qingedaig › java-bigdecimal-vs-double-vs-float-012c7149e550
Java BigDecimal vs double vs float | by Alice Dai | Medium
October 15, 2024 - Precision: Use BigDecimal for precise calculations, particularly in financial applications. Performance: Use double for general floating-point arithmetic when performance matters but precision is not critical.
🌐
GitHub
gist.github.com › hillmanli-seekers › a8ab8e463e7b60989e6d0c0900cf4d93
BigDecimal vs double: illustration of accuracy and performance impact · GitHub
Time taken for double calculation: 1.716163ms Time taken for Kahan double calculation: 3.549576ms Time taken for BigDecimal calculation: 97.298124ms Value diff for simple sum: 8.68145523891E-10 Value diff for Kahan sum: 1.854476109E-12 · Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment · You can’t perform that action at this time.
🌐
sqlpey
sqlpey.com › java › java-double-vs-bigdecimal-precision
Java Double vs BigDecimal: Precision, Performance, and When to Choose Which
November 4, 2025 - Double: 0.3 - 0.2 = 0.09999999999999998 ... it comes with specific drawbacks: Performance Penalty: Operations involving BigDecimal are significantly slower than primitive arithmetic performed by double or float....
🌐
Blogger
azagorneanu.blogspot.com › 2011 › 07 › javamathbigdecimal-performance.html
Thinking about IT: java.math.BigDecimal performance
As you know, primitive double don't ... number is represented by an approximated value). Whilst, java.math.BigDecimal gives you the required precision, its performance is very poor comparable to primitive types....
🌐
Medium
medium.com › @qingedaig › java-double-vs-bigdecimal-6bc3ef0329a3
Java: double vs bigDecimal. This is one of those subtle but… | by Alice Dai | Medium
August 23, 2025 - Use double for ratings and averages in a ticketing system. Ratings are small integers → averages won’t accumulate catastrophic floating-point errors. Sorting/ranking won’t be affected in any meaningful way.
🌐
LinkedIn
linkedin.com › pulse › why-we-should-use-bigdecimal-instead-double-java-financial-ismail
Why we should use BigDecimal instead double in java for financial systems
May 17, 2022 - So if we have a system where low latency is crucial than the decimal part of a number, we should go for double. But in financial or any other systems where each digit of decimal part are important, BigDecimal should be chosen over double/float.
🌐
DEV Community
dev.to › stefanofago73 › double-bigdecimal-or-fixed-point-2hp
double, BigDecimal, or Fixed-Point? - DEV Community
July 14, 2026 - BigDecimal operations allocate ... scale and precision metadata at every step. Compared to double, which compiles down to a single FPU instruction, the overhead is enormous....
🌐
Medium
serdaralkancode.medium.com › why-use-bigdecimal-instead-of-double-java-179e51cd1cbc
Why use BigDecimal instead of Double? (Java) | by Serdar ALKAN | Medium
October 1, 2024 - BigDecimal can be slower than Double. Because BigDecimal stores very big number and uses more memory.
🌐
Quora
quora.com › How-often-is-BigDecimal-more-appropriate-than-double-in-Java
How often is BigDecimal more appropriate than double in Java? - Quora
Answer (1 of 2): BigDecimal is not a premature optimization. If anything, just the opposite. BigDecimal is a lot slower than double or float, as much as two or even three orders of magnitude. BigDecimal is about correctness. It takes a lot of arithmetic for the rounding errors in a double to ...
🌐
ResearchGate
researchgate.net › publication › 330780422_Performance_Analysis_of_BigDecimal_Arithmetic_Operation_in_Java
(PDF) Performance Analysis of BigDecimal Arithmetic Operation in Java
March 1, 2026 - However, it comes with a drawback: BigDecimal is treated as an object and requires additional CPU and memory usage to operate with. In this paper, statistical data are presented of performance impact on using BigDecimal compared to the double ...