# Rounding rules

**URL:** <https://boards.straightdope.com/t/rounding-rules/323682>\
**Category:** Factual Questions\
**Created:** [September 27, 2005, 3:49pm UTC](https://boards.straightdope.com/t/rounding-rules/323682 "2005-09-27T15:49:40Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Schnitte](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/schnitte/32/9033_2.png) [@Schnitte](https://boards.straightdope.com/u/Schnitte)\
**Post date:** [September 27, 2005, 3:49pm UTC](https://boards.straightdope.com/t/rounding-rules/323682/1 "2005-09-27T15:49:40Z")

</div>

If I have a value of 15.97, which I want gto round to a precision of one position after decimal point, will it become 15.9 or 16.0 (because the .97 gets rounded up to the next value, which happens to be .0 and makes the entire number go up to 16.0)?

I guess 16.0 is what I get following strict rounding rules, but it looks strange to me because the original number is definitely below 16 and gets the look of 16 because of double rounding. Which is accurate?

---

<div class="post-metadata">

**Author:** ![Giles](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/giles/32/60_2.png) [@Giles](https://boards.straightdope.com/u/Giles)\
**Post date:** [September 27, 2005, 3:57pm UTC](https://boards.straightdope.com/t/rounding-rules/323682/2 "2005-09-27T15:57:02Z")

</div>

Yes, you would round to 16.0, because that’s the closest number with one digit after the decimal point. Similarly, 9.7 would be rounded to 10 if you round to the nearest integer.

---

<div class="post-metadata">

**Author:** ![Q.E.D](https://avatars.discourse-cdn.com/v4/letter/q/51bf81/32.png) [@Q.E.D](https://boards.straightdope.com/u/Q.E.D)\
**Post date:** [September 27, 2005, 3:58pm UTC](https://boards.straightdope.com/t/rounding-rules/323682/3 "2005-09-27T15:58:49Z")

</div>

You are correct that it should be 16.0. You round up if the digit immediately to the right of where you are truncating is greater than 5 and let it be if the digit is less than 5. If it IS 5 and followed by zero, you round up if the digit to the left of the truncation point is odd, otherwise leave it alone. This last is to compensate for the bias which creeps in from always rounding up on 5.

---

<div class="post-metadata">

**Author:** ![Fromage\_A\_Trois](https://avatars.discourse-cdn.com/v4/letter/f/a88e57/32.png) [@Fromage\_A\_Trois](https://boards.straightdope.com/u/Fromage_A_Trois)\
**Post date:** [September 27, 2005, 4:10pm UTC](https://boards.straightdope.com/t/rounding-rules/323682/4 "2005-09-27T16:10:19Z")

</div>

It’s worth pointing out that the .0 is important - although I think you know that. 16.0 means you’ve rounded to the nearest tenth - simply putting 16 implies that you’ve rounded to the nearest integer, which you haven’t.

---

<div class="post-metadata">

**Author:** ![FatBaldGuy](https://avatars.discourse-cdn.com/v4/letter/f/ecd19e/32.png) [@FatBaldGuy](https://boards.straightdope.com/u/FatBaldGuy)\
**Post date:** [September 27, 2005, 4:47pm UTC](https://boards.straightdope.com/t/rounding-rules/323682/5 "2005-09-27T16:47:24Z")

</div>

> [@Q.E.D.](#):
>
> If it IS 5 and followed by zero, you round up if the digit to the left of the truncation point is odd, otherwise leave it alone. This last is to compensate for the bias which creeps in from always rounding up on 5.

Is this something new? I’ve never encountered this rule before. I was always taught to round up if the digit being truncated is 5 or greater. Period.

Do rounding algorithms in most common computer applications and programming languages follow this rule?

---

<div class="post-metadata">

**Author:** ![FatBaldGuy](https://avatars.discourse-cdn.com/v4/letter/f/ecd19e/32.png) [@FatBaldGuy](https://boards.straightdope.com/u/FatBaldGuy)\
**Post date:** [September 27, 2005, 4:52pm UTC](https://boards.straightdope.com/t/rounding-rules/323682/6 "2005-09-27T16:52:32Z")

</div>

> [@FatBaldGuy](#):
>
> Is this something new? I’ve never encountered this rule before. I was always taught to round up if the digit being truncated is 5 or greater. Period.
> 
> Do rounding algorithms in most common computer applications and programming languages follow this rule?

A few moments of experimentation in Excel tends to support the “always round up on 5” rule.

---

<div class="post-metadata">

**Author:** ![mks57](https://avatars.discourse-cdn.com/v4/letter/m/b9bd4f/32.png) [@mks57](https://boards.straightdope.com/u/mks57)\
**Post date:** [September 27, 2005, 4:55pm UTC](https://boards.straightdope.com/t/rounding-rules/323682/7 "2005-09-27T16:55:21Z")

</div>

> [@FatBaldGuy](#):
>
> Is this something new? I’ve never encountered this rule before. I was always taught to round up if the digit being truncated is 5 or greater. Period.
> 
> Do rounding algorithms in most common computer applications and programming languages follow this rule?

It’s common in modern computers that use IEEE floating point arithmetic. It’s called round to nearest or even. A programming language may require other behavior.

---

<div class="post-metadata">

**Author:** ![Q.E.D](https://avatars.discourse-cdn.com/v4/letter/q/51bf81/32.png) [@Q.E.D](https://boards.straightdope.com/u/Q.E.D)\
**Post date:** [September 27, 2005, 5:25pm UTC](https://boards.straightdope.com/t/rounding-rules/323682/8 "2005-09-27T17:25:33Z")

</div>

> [@FatBaldGuy](#):
>
> Is this something new? I’ve never encountered this rule before.

It’s not all that new. I’m not sure how long it’s been around, but I do know that NIST (IIRC) requires that digital scales used to weigh consumer goods, among other applications which require rounding, must use this rule.

---

<div class="post-metadata">

**Author:** ![Exapno\_Mapcase](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/exapno_mapcase/32/1051_2.png) [@Exapno\_Mapcase](https://boards.straightdope.com/u/Exapno_Mapcase)\
**Post date:** [September 27, 2005, 5:34pm UTC](https://boards.straightdope.com/t/rounding-rules/323682/9 "2005-09-27T17:34:46Z")

</div>

Note that these are mostly conventions, not rules. There is no person or body that requires these roundings in most everyday applications, merely conventional practice and logic. There are particular, if rare, applications that always drop to the lower number rather than round up.

It’s the same things as styles in language as opposed to rules of grammar.

---

<div class="post-metadata">

**Author:** ![DarrenS](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@DarrenS](https://boards.straightdope.com/u/DarrenS)\
**Post date:** [September 27, 2005, 6:06pm UTC](https://boards.straightdope.com/t/rounding-rules/323682/10 "2005-09-27T18:06:37Z")

</div>

> [@Exapno Mapcase](#):
>
> It’s the same things as styles in language as opposed to rules of grammar.

Oh boy, [there’s](http://boards.straightdope.com/sdmb/showthread.php?t=335762) a can of worms.

---

<div class="post-metadata">

**Author:** ![Jurph](https://avatars.discourse-cdn.com/v4/letter/j/50afbb/32.png) [@Jurph](https://boards.straightdope.com/u/Jurph)\
**Post date:** [September 27, 2005, 6:26pm UTC](https://boards.straightdope.com/t/rounding-rules/323682/11 "2005-09-27T18:26:03Z")

</div>

> [@FatBaldGuy](#):
>
> A few moments of experimentation in Excel tends to support the “always round up on 5” rule.

I remember a weird thing we were supposed to do in Chemistry class. Now, the class was taught by a total idiot who was stuck in the Stone Age, and while he may have been hired to teach Alchemy back in the day, he was kept on as the Chemistry teacher for his ability to coach baseball. Anyway:

His rule was that if you were rounding, for example, 7.53 to the nearest integer, then you would look to the .03, and round down if the digit was odd, and up if it was even. So a 7.53 – even though 8 is _clearly_ closer than 7 – would be rounded down to 7. 7.63 would be rounded up because of the “6”, and 7.43 would be rounded down because of the “4”.

He claimed that this kept “random” data from accruing a rounding bias, but it seems to me he was full of crap. Anyone heard of this? Am I misconstruing his instructions?

---

<div class="post-metadata">

**Author:** ![Peter\_Morris](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/peter_morris/32/359_2.png) [@Peter\_Morris](https://boards.straightdope.com/u/Peter_Morris)\
**Post date:** [September 27, 2005, 7:37pm UTC](https://boards.straightdope.com/t/rounding-rules/323682/12 "2005-09-27T19:37:55Z")

</div>

> [@Jurph](#):
>
> I remember a weird thing we were supposed to do in Chemistry class… Anyone heard of this?

I was taught the same, but I think it only applies when rounding a lot of numbers at a time. If you always round 5s up, it does tend to skew the totals up a notch. So instead, sometimes round them up, and sometimes down.

---

<div class="post-metadata">

**Author:** ![Jurph](https://avatars.discourse-cdn.com/v4/letter/j/50afbb/32.png) [@Jurph](https://boards.straightdope.com/u/Jurph)\
**Post date:** [September 27, 2005, 7:49pm UTC](https://boards.straightdope.com/t/rounding-rules/323682/13 "2005-09-27T19:49:29Z")

</div>

> [@Peter Morris](#):
>
> If you always round 5s up, it does tend to skew the totals up a notch. So instead, sometimes round them up, and sometimes down.

But assuming a random distribution of numbers, wouldn’t you expect half of them to end in 0,1,2,3, and 4 and the other half to end in 5,6,7,8, and 9? That is: of the ten digits we use, if you’re just looking at one digit, and assuming its value is random, shouldn’t cutting the set precisely in half remove the bias to begin with?

---

<div class="post-metadata">

**Author:** ![borschevsky](https://avatars.discourse-cdn.com/v4/letter/b/97f17d/32.png) [@borschevsky](https://boards.straightdope.com/u/borschevsky)\
**Post date:** [September 27, 2005, 8:18pm UTC](https://boards.straightdope.com/t/rounding-rules/323682/14 "2005-09-27T20:18:18Z")

</div>

Yes, but look at how much you’re rounding off in those two groups. When you round down 0,1,2,3,4, you’re rounding off an average of 2. When you round up 5,6,7,8,9, you’re rounding up an average of 3.

```auto

value rounded
10.0 10
10.1 10
10.2 10
10.3 10
10.4 10
10.5 11
10.6 11
10.7 11
10.8 11
10.9 11
----------
54.5 55

```

---

<div class="post-metadata">

**Author:** ![Peter\_Morris](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/peter_morris/32/359_2.png) [@Peter\_Morris](https://boards.straightdope.com/u/Peter_Morris)\
**Post date:** [September 27, 2005, 8:27pm UTC](https://boards.straightdope.com/t/rounding-rules/323682/15 "2005-09-27T20:27:21Z")

</div>

> [@Jurph](#):
>
> But assuming a random distribution of numbers, wouldn’t you expect half of them to end in 0,1,2,3, and 4 and the other half to end in 5,6,7,8, and 9? That is: of the ten digits we use, if you’re just looking at one digit, and assuming its value is random, shouldn’t cutting the set precisely in half remove the bias to begin with?

Yes, but 0 doesn’t need rounding. So:

1,2,3,4 - round down  
6,7,8, 9 - round up  
5 - half the time round up, half the time round down.

---

<div class="post-metadata">

**Author:** ![jawdirk](https://avatars.discourse-cdn.com/v4/letter/j/df705f/32.png) [@jawdirk](https://boards.straightdope.com/u/jawdirk)\
**Post date:** [September 27, 2005, 8:33pm UTC](https://boards.straightdope.com/t/rounding-rules/323682/16 "2005-09-27T20:33:00Z")

</div>

> [@borschevsky](#):
>
> ```auto
> 
> ...
> 10.7 11
> 10.8 11
> 10.9 11
> ----------
> 54.5 55
> 
> ```

Yes, but that’s ok, because 54.5 rounded is 55. 😃

---

<div class="post-metadata">

**Author:** ![Smeghead](https://avatars.discourse-cdn.com/v4/letter/s/f1d935/32.png) [@Smeghead](https://boards.straightdope.com/u/Smeghead)\
**Post date:** [September 27, 2005, 8:33pm UTC](https://boards.straightdope.com/t/rounding-rules/323682/17 "2005-09-27T20:33:51Z")

</div>

In all the science settings I’ve been in, I’ve always rounded a five to the even number. So if it’s 13.5, round to 14, and if it’s 16.5, round to 16.

---

<div class="post-metadata">

**Author:** ![AskNott](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/asknott/32/5790_2.png) [@AskNott](https://boards.straightdope.com/u/AskNott)\
**Post date:** [September 27, 2005, 8:38pm UTC](https://boards.straightdope.com/t/rounding-rules/323682/18 "2005-09-27T20:38:57Z")

</div>

Eh… I would quote the relevant rules about rounding a mark in sailboat racing, but I’m too lazy to look it up. Something about overlaps and hailing for “room at the mark!”

---

<div class="post-metadata">

**Author:** ![Jurph](https://avatars.discourse-cdn.com/v4/letter/j/50afbb/32.png) [@Jurph](https://boards.straightdope.com/u/Jurph)\
**Post date:** [September 27, 2005, 8:39pm UTC](https://boards.straightdope.com/t/rounding-rules/323682/19 "2005-09-27T20:39:03Z")

</div>

> [@Smeghead](#):
>
> In all the science settings I’ve been in, I’ve always rounded a five to the even number. So if it’s 13.5, round to 14, and if it’s 16.5, round to 16.

This makes sense to me. Perhaps this was the approach he was recommending? It is possible – however unlikely – that my chemistry teacher was not a total idiot. And that’s as close to an apology as he’s ever going to get.

---

<div class="post-metadata">

**Author:** ![UncleBeer](https://avatars.discourse-cdn.com/v4/letter/u/977dab/32.png) [@UncleBeer](https://boards.straightdope.com/u/UncleBeer)\
**Post date:** [September 27, 2005, 8:53pm UTC](https://boards.straightdope.com/t/rounding-rules/323682/20 "2005-09-27T20:53:44Z")

</div>

> [@Smeghead](#):
>
> In all the science settings I’ve been in, I’ve always rounded a five to the even number. So if it’s 13.5, round to 14, and if it’s 16.5, round to 16.

Yup. That’s my experience, too. And it mirrors what Q.E.D. said above.

[Next page](https://boards.straightdope.com/t/rounding-rules/323682.md?page=2)
