Calculating Huge Numbers in Excel

  • Thread starter Thread starter StevieTNZ
  • Start date Start date
  • Tags Tags
    Calculations Excel
AI Thread Summary
In Excel, calculations involving very large numbers are limited to 15 significant figures, which leads to rounding errors when numbers exceed this limit. For example, adding 50 to a number like 100,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000 results in the loss of the 50 due to Excel's constraints. Other software, such as Computer Algebra Systems (e.g., Mathematica, Sage, Maple) and certain programming languages (e.g., Java), can handle larger integers and provide accurate results without this limitation. The discussion also touches on the impact of operand order in calculations, noting that while it can sometimes help maintain precision, it does not resolve the fundamental issue of Excel's integer handling capabilities.
StevieTNZ
Messages
1,934
Reaction score
873
Hi there,

If I perform the following calculation in Excel:
=100,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000+50

I get: 100,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000

Shouldn't the answer be:
100,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,050?
 
Computer science news on Phys.org
No, the answer will be constrained by the number of bits used by the computer to represent the numbers, and you've got WAY more than it can handle, so the 50 gets dropped as a rounding error.
 
Is there any other program out there that will present the result given in my original post?
 
Lots of other programs can do that.
Computer Algebra Systems, like Mathematica, Sage, Maxima, Reduce, Maple... all do that.
http://en.wikipedia.org/wiki/Computer_algebra_system

Some calculator programs, like bc and many others do that.
https://www.google.com/search?q=big+integer+calculator&oq=big+integer+calculator

Many programming languages, like Icon, Java... do that, don't be fooled by those who think 64 bits is big.
https://www.google.com/search?q=programming+language+big+integer&oq=programming+language+big+integer
 
64 bits is chump change for deep calculations. You need a monster computer to process calculations beyond a few hundred decimal points. That is why numerical analysis takes so long and is so incredibly expensive.
 
Just for grins, try putting the smaller number first.
 
harborsparrow said:
Just for grins, try putting the smaller number first.

Do you really think that's going to have any effect on the fact that the larger number is WAY bigger than Excel can handle as an integer?
 
phinds said:
Do you really think that's going to have any effect on the fact that the larger number is WAY bigger than Excel can handle as an integer?

Sometimes it does help to prevent loss of precision by putting the smaller number first, when there is a huge range of magnitude difference between two operands.
 
  • #10
harborsparrow said:
Sometimes it does help to prevent loss of precision by putting the smaller number first, when there is a huge range of magnitude difference between two operands.

Yes, and that does not answer my question at all. I am asking about a specific case.
 
Back
Top