+ Reply to Thread
Results 1 to 5 of 5

Where do these tiny maths error come from?

  1. #1
    Registered User
    Join Date
    02-18-2020
    Location
    London
    MS-Off Ver
    2010
    Posts
    75

    Where do these tiny maths error come from?

    Hi

    Not a big problem, but out of curiosity I just wondered why this happens...

    Occasionally on my sheets I get minor maths errors appearing, so that a value with should be Zero is for example -0.0000000036. I am only summing the values of different cells and not doing any division or multiplication.

    This is not a problem except when I am doing something like =IF(A1=0... which returns false instead of true. To fix this I simple use the ROUND function to limit the result to 2 decimal places and remove the error.

    So out of curiosity, does anyone know why this happens, where does this error come from?

    Thanks
    Robin

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Where do these tiny maths error come from?

    To fix this I simple use the ROUND function to limit the result to 2 decimal places and remove the error.

    The sum of the round values are differant than the original data.

    e.g.
    HTML Code: 
    So you get a differance of 0.0024
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,931

    Re: Where do these tiny maths error come from?

    Regarding the "why?", the floating point error in Excel is well-documented. Here's a link you might find useful: https://docs.microsoft.com/en-us/off...ccurate-result

    Being aware of it and mitigating it in the way explained in post #2 will save you a lot of headaches.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  4. #4
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,150

    Re: Where do these tiny maths error come from?

    This is due to the fact that; when Excel stores a number in memory, it is converted to a corresponding binary number in order to save space in memory and for increasing the speed of calculations.

    So, you will have to remember this fact especially when you are comparing values of two cells such as in formulas for custom formatting.

    Therefore; you have to round the numbers before comparing or accept a relatively small difference such as "0.0001" or so...
    Last edited by Haluk; 07-26-2020 at 04:49 AM. Reason: typo...

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,931

    Re: Where do these tiny maths error come from?

    @rebecacamp

    Welcome to the forum.

    Be aware that making ten pointless posts simply raises our suspicion about your motive for being here, so I have my eye on you. Please start your own thread if you have a genuine question. Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Can't figure out how to remove these tiny [+] boxes!
    By bigscientist in forum Excel General
    Replies: 2
    Last Post: 06-11-2020, 01:25 AM
  2. [SOLVED] Error on time calculations - tiny fraction (perhaps rounding?)
    By onmyway in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-24-2015, 12:00 PM
  3. [SOLVED] Formula that is KILLING MY TINY BRAIN
    By ennudmotty in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-21-2012, 11:35 AM
  4. Don't Display Tiny Numerical Values
    By Larry.LeBlanc@O in forum Excel General
    Replies: 4
    Last Post: 02-24-2009, 05:47 PM
  5. Tiny text in Combo Box
    By heski in forum Excel General
    Replies: 1
    Last Post: 06-07-2007, 11:22 AM
  6. [SOLVED] Tiny graph
    By grantr in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 08-18-2006, 10:50 AM
  7. TINY TINY SMALL FONT IN Excel tabs
    By CIA in forum Excel General
    Replies: 0
    Last Post: 03-16-2005, 03:50 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1