Rounddown Calculation issue or confusion?

blewispunk

New Member
Joined
Mar 31, 2003
Messages
12
Hello,

I'm trying to use the rounddown function and getting some odd results that seem like a bug but maybe I'm confused by the function.

I have
A1 = 0.110
A2 = 0.101

My function is =ROUNDDOWN(A1-A2,3)

I keep getting a result of 0.008 even though simple math should result in 0.009. I would think this would be due to extra digits being in cell A1 or A2 but the values entered are exactly as shown here. If I try different values it seems to be working correctly with other combinations I've tried but this one is goofy. When I change the calculation to =ROUNDDOWN(A1-A2,4) I get a result of 0.0089, so it is doing some incorrect math.

Any thoughts on this? I'm using Excel 2007.
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

zzjasonzz

Well-known Member
Joined
Apr 23, 2006
Messages
649
its rounding it down? what result would you expect?

0.0089 rounded down to 3 s.f. is 0.008
 

barry houdini

MrExcel MVP
Joined
Mar 23, 2005
Messages
20,825
Due to the way Excel calculates you sometimes get "rounding errors" so in this case instead of 0.009 the result of A1-A2 is actually 0.00899999999999999 [according to Excel] hence the result of 0.008 when rounded down. You can get round that by rounding within the rounddown, i.e.

=ROUNDDOWN(ROUND(A1-A2,5),3)

See here for more details
 

Watch MrExcel Video

Forum statistics

Threads
1,130,307
Messages
5,641,440
Members
417,209
Latest member
Agbarker

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
Top