SOLVED

Excel roundup decimal 0.15 problem

Copper Contributor
hi team, Kindly look out the excel which i have added. can u pls checked the calculation.when i subtracted cell C with cell D i have result in cell cell E(here no issues).but when i round of the result i got answer in cell F(here is the issue).look out when decimal 0.25 will be round to 0.3 & 0.35 to 0.4 but why 0.15 to 0.1?(expected is 0.2) yellow highlighted provide the answer/reason?we hav pblm in business.


https://twitter.com/messages/media/1145015162853662724
2 Replies
best response confirmed by VI_Migration (Silver Contributor)
Solution

@Neelakandan2408 

That's since 20.15-20 actually is equal to 

0.14999999999999900

https://www.microsoft.com/en-us/microsoft-365/blog/2008/04/10/understanding-floating-point-precision...

The workaround is

=ROUND(B1,1)-ROUND(A1,1)

I also can confirm that the actual # is 0.149 which rounds down and needs to have a "round" function added. Please mark the first comment with this answer as correct! @Neelakandan2408 

-Aron

1 best response

Accepted Solutions
best response confirmed by VI_Migration (Silver Contributor)
Solution

@Neelakandan2408 

That's since 20.15-20 actually is equal to 

0.14999999999999900

https://www.microsoft.com/en-us/microsoft-365/blog/2008/04/10/understanding-floating-point-precision...

The workaround is

=ROUND(B1,1)-ROUND(A1,1)

View solution in original post