Excel formula / calculation issue

manekankit

Board Regular
Joined
Feb 1, 2019
Messages
72
Office Version
  1. 365
Platform
  1. Windows
I have below values in cells A1 and B1.
A1: 118999.26
B1: 118231.21

values in A1 and B1 are pasted and each contains 2 decimals only.

In the cell C1, when I apply formula "A1-B1", and increase decimals, it is giving me the answer as "768.050000000003"

Where is the last 3 coming from in the answer?

When I checked the same in a different laptop, it gave me some different answer but still the answer had some decimals on the extreme end.

What would be the issue?

Using office 365 on win10 laptop.
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
You're welcome. Unfortunately Excel is not always perfect at arithmetic. If this could be an issue, it is mostly solved by rounding the results to a relevant significance. For example, with your sample data having 2 decimal places, instead of
Excel Formula:
=A1-B1
you might do something like ..
Excel Formula:
=ROUND(A1-B1,6)
 
Upvote 0
You're welcome. Unfortunately Excel is not always perfect at arithmetic. If this could be an issue, it is mostly solved by rounding the results to a relevant significance. For example, with your sample data having 2 decimal places, instead of
Excel Formula:
=A1-B1
you might do something like ..
Excel Formula:
=ROUND(A1-B1,6)
yes, rounding does the job.

However I am more surprised to notice that when decimals are increased, the same formula is giving different answer in the same pc/same file at a different point of time. further answer also differs when we test in a different pc.
 
Upvote 0

Forum statistics

Threads
1,224,830
Messages
6,181,228
Members
453,025
Latest member
Hannah_Pham93

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top