Computer Learning Zone CLZ Access Excel Word Windows

I will choose a path that's clear. I will choose free will.

-Rush
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Excel Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Zero not really zero
Peter van Soest 
    
3 years ago
On a regular basis I see a very strange 'thing' happening in Excel, when I 'SUM' a column of numbers with 2 decimals. The SUM should add up to exactly 0, but it doesn't. In stead I get something like 0,000000000016007 (see picture)

Although is doesn't really effect the outcome I need, it bothers me and at least I would like to know why It happens. So if anyone has a clue, please explain!

By the way, the reason I noticed this in the first place is that my standard number format is to display a '-' when the outcome is zero, and in these cases I see "0,0"

grtz Peter
Peter van Soest OP  @Reply  
    
3 years ago

Peter van Soest OP  @Reply  
    
3 years ago

Richard Rost  @Reply  
          
3 years ago
I actually have this on my list to make a video about it. Stay tuned.

In the meantime, are you using Double or Decimal? The problem exists with both, but it's more prevalent in Double - but unfortunately that's the easier one to work with.
Kevin Yip  @Reply  
     
3 years ago
This phenomenon is known as floating point error, and it exists in all computers.  Many computer professionals are (and should be) well aware of this.  In short, any math that involves decimals could yield a result that is slightly off.  You can easily demonstrate this by adding 0.1 + 0.2 in Access, which results in something that does not equal to 0.3 (see picture below).  One way to mitigate this is to round off your results to the decimal places you need.
Kevin Yip  @Reply  
     
3 years ago

Kevin Yip  @Reply  
     
3 years ago
In the above example, when Access adds 0.1+0.2, the result is actually 0.29999999999999... .  You can confirm this with:

    0.1 + 0.2 - 0.3

which yields the result pictured below.  It is an infinitesimal error, but an error nonetheless.  The more complex the math, the bigger the error due to a snowball effect.
Kevin Yip  @Reply  
     
3 years ago

Peter van Soest OP  @Reply  
    
3 years ago
@Kevin, tnx I did't know this.
I'm hesitant to round the number, because that would also hide any  real errors in the column,
I will just make 4 decimals or so visible, if they are all zero it's ok.


@Richard, I don't really have a choice between Decimal and Double in Excel like you have in Access,
I use 'numbers' with a customized format  #.##0,00_ ;[Red]-#.##0,00;" - "
btw I have Office 2019
Kevin Yip  @Reply  
     
3 years ago
For simple arithmetic it should be fine.  My example above shows an error only after the 17th decimal digit, which is good enough for most everyday applications.  

The sci-tech world is filled with examples of not getting the real thing, but a "good enough" approximation of the real thing.  Newton and Einstein laws of motion both yield errors in extreme cases that the laws can't account for.  JPG pictures, streaming videos and audio, etc. are all compressed, approximate versions of the "real thing", i.e. raw, uncompressed data.  A more mundane example: you want to prove a cave has no bears inside without entering the cave and risking your life.  You check for other cave entrances (no).  You put powder at the entrance to catch the bear's footprints.  You use security camera, etc.  After N days or weeks with no evidence, you can safely conclude that either there is no bear, or the bear has already died of starvation inside.  Nobody is gonna say, oh, but we don't actually have proof.  They have "sufficiently proved" with "good enough" evidence that the cave has no bear.
Richard Rost  @Reply  
          
3 years ago
Did realize this was an Excel question. I spend so much time w Access. LOL
Monica Jones  @Reply  
       
3 years ago
I first found this in a multi-year checkbook register I had. Apparently it will start making a "difference" by a penny after many rows (I think mine was over 1,000). My answer was to break into multiple files and eventually move to Access.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Excel Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 6/22/2026 10:21:50 AM. PLT: 1s