# What Does ½ Really Round Off To?

**URL:** <https://boards.straightdope.com/t/what-does-really-round-off-to/939533>\
**Category:** Factual Questions\
**Created:** [April 7, 2021, 8:47am UTC](https://boards.straightdope.com/t/what-does-really-round-off-to/939533 "2021-04-07T08:47:52Z")\
**Posts on this page:** 12\
**Page:** 3

<div class="post-metadata">

**Author:** ![LSLGuy](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lslguy/32/5813_2.png) [@LSLGuy](https://boards.straightdope.com/u/LSLGuy)\
**Post date:** [April 8, 2021, 3:18pm UTC](https://boards.straightdope.com/t/what-does-really-round-off-to/939533/41 "2021-04-08T15:18:52Z")

</div>

> [@Dr.Strangelove](#):
>
> > [@Chronos](#):
> >
> > The actual line of scrimmage is real-valued
> 
> So you say. I’m less certain that the universe operates on real numbers. It might use hyperreals, or even the surreal numbers.

I have to say over the years I’ve seen the refs spot balls in places that can only be described as surreal compared to the results of the play I just watched.

> [@Quercus](#):
>
> But of course, that may be different in a different version of Excel (and I have a cynical suspicion is _is_ different, which is the reason the documentation doesn’t commit to anything. But that may be tooo cynical)

Given MSFT’s dedication to avoiding breaking changes, I’d bet that’s not the case. IMO their sin is mostly that they’re trying to write documentation that won’t overwhelm Sally from data entry or the typical PHB with details they cannot comprehend. Each page really needs a nerd-mode switch that will expose the other 5 pages of nitty gritty for those who care.

> [@74westy](#):
>
> It does have a few examples and, mischievously, some of them show a number on the midpoint being rounded and in every such example, round .5 up and round to even give the same answer. It’s as if they’re taunting us!

I just _love_ it when the examples are ambiguous! Morons.

My favorite example of that is the various formatting settings in Windows and Excel for dates and times where the example uses a two digit month or 2 digit hour so you can’t tell how leading zeros will be handled, or shows a time value before 1200 so you can’t tell how afternoon time will be handled. Will 1pm be “13:00” or “1:00” or “01:00” with or without a trailing “pm” and with what spacing? No way to know since the example value they picked was 10:15.

---

<div class="post-metadata">

**Author:** ![Atamasama](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/atamasama/32/12961_2.png) [@Atamasama](https://boards.straightdope.com/u/Atamasama)\
**Post date:** [April 8, 2021, 5:03pm UTC](https://boards.straightdope.com/t/what-does-really-round-off-to/939533/42 "2021-04-08T17:03:57Z")

</div>

> [@LSLGuy](#):
>
> Given MSFT’s dedication to avoiding breaking changes, I’d bet that’s not the case. IMO their sin is mostly that they’re trying to write documentation that won’t overwhelm Sally from data entry or the typical PHB with details they cannot comprehend. Each page really needs a nerd-mode switch that will expose the other 5 pages of nitty gritty for those who care.

I generally go to [Technet](https://docs.microsoft.com/en-us/) for that kind of info.

---

<div class="post-metadata">

**Author:** ![74westy](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/74westy/32/3950_2.png) [@74westy](https://boards.straightdope.com/u/74westy)\
**Post date:** [April 8, 2021, 5:23pm UTC](https://boards.straightdope.com/t/what-does-really-round-off-to/939533/43 "2021-04-08T17:23:19Z")

</div>

> [@Atamasama](#):
>
> I generally go to [Technet](https://docs.microsoft.com/en-us/) for that kind of info.

I couldn’t easily find the ROUND function in excel so here’s the documentation for [ROUND](https://docs.microsoft.com/en-us/sql/t-sql/functions/round-transact-sql?view=sql-server-ver15) in t-sql. Please read it and tell me what method it uses.

---

<div class="post-metadata">

**Author:** ![LSLGuy](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lslguy/32/5813_2.png) [@LSLGuy](https://boards.straightdope.com/u/LSLGuy)\
**Post date:** [April 8, 2021, 5:26pm UTC](https://boards.straightdope.com/t/what-does-really-round-off-to/939533/44 "2021-04-08T17:26:59Z")

</div>

ETA: @Atamasama 2 posts above …

My cite also leads to MSFT’s official documentation. FYI “Technet” was the name of the IT administrator part of Microsoft’s documentation site back 20ish years ago. Hasn’t been called that for years. Likewise “MSDN” was the name for the dev documentation part.

The problem is their documentation for Office is aimed way too much at the lowest common denominator end user, not the “power user”, and certainly not the developer. Even though they’re still pushing development of Office-based apps.

Even the C# or .Net Framework docs can be maddeningly incomplete in spots. Some of that may be deliberate so as not to create contractual behavior, but again given their admirable dedication to backwards compatibility, _everything_ about an API becomes contractual very quickly after it’s released into the wild. Even the bugs.

See **[Hyrum’s Law](https://www.hyrumslaw.com/)** for more which includes a reference to this wise commentary:

> **[Workflow](https://xkcd.com/1172/)**
>
> There are probably children out there holding down spacebar to stay warm in the winter! YOUR UPDATE MURDERS CHILDREN.

---

<div class="post-metadata">

**Author:** ![LSLGuy](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lslguy/32/5813_2.png) [@LSLGuy](https://boards.straightdope.com/u/LSLGuy)\
**Post date:** [April 8, 2021, 5:33pm UTC](https://boards.straightdope.com/t/what-does-really-round-off-to/939533/45 "2021-04-08T17:33:08Z")

</div>

> [@74westy](#):
>
> I couldn’t easily find the ROUND function in excel so here’s the documentation for [ROUND](https://docs.microsoft.com/en-us/sql/t-sql/functions/round-transact-sql?view=sql-server-ver15) in t-sql. Please read it and tell me what method it uses.

You already posted the link to it:

> [@74westy](#):
>
> That information does not appear on the specific page for the [ROUND()](https://support.microsoft.com/en-us/office/round-function-c018c5d8-40fb-4053-90b1-b3e7f61a213c) function (where you might look if you’re wondering how that function works).

That IS the official site/cite for MFST Office documentation.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [April 8, 2021, 6:36pm UTC](https://boards.straightdope.com/t/what-does-really-round-off-to/939533/46 "2021-04-08T18:36:27Z")

</div>

> [@k9bfriender](#):
>
> I would generally assume that the generic round function would be the one that most of us learned in grade-school, and many never learned anything else, that a 5 and up gets rounded up. Any different rounding function should be specified.

Yup, and does -1.5 round “up” to -2, or “up” to -1? Our grade school teachers probably never specified. Those probably represent two of those 11 different rounding functions. And yes, I would expect that the generic “round” function probably is one of those two.

---

<div class="post-metadata">

**Author:** ![Thudlow\_Boink](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/thudlow_boink/32/320_2.png) [@Thudlow\_Boink](https://boards.straightdope.com/u/Thudlow_Boink)\
**Post date:** [April 8, 2021, 6:52pm UTC](https://boards.straightdope.com/t/what-does-really-round-off-to/939533/47 "2021-04-08T18:52:17Z")

</div>

> [@Chronos](#):
>
> Yup, and does -1.5 round “up” to -2, or “up” to -1?

-1.500001 is closer to -2 than to -1. So if you follow the “consistency” rule, it would round to -2.

> [@tofor](#):
>
> These all round to 2:  
> 1.59999999  
> 1.50000001  
> 1.5
> 
> It’s easy to see that rounding up is the right answer for the first two, and for the third we are just being consistent.

---

<div class="post-metadata">

**Author:** ![Melbourne](https://avatars.discourse-cdn.com/v4/letter/m/b5e925/32.png) [@Melbourne](https://boards.straightdope.com/u/Melbourne)\
**Post date:** [April 9, 2021, 2:56am UTC](https://boards.straightdope.com/t/what-does-really-round-off-to/939533/48 "2021-04-09T02:56:09Z")

</div>

> [@YamatoTwinkie](#):
>
> To get this in excel, you’re probably going to have to use a nested =IF() logic function to check for positive/negative numbers cleanly divisible by 0.5, then round _only_ those to even using MROUND(), then round the rest using ROUND().

Or use VBA. VBA doesn’t have a ‘round’ function as such, but functions such as CINT use the rounding function that is part of the Windows API. And (since sometime last century), it’s bankers rounding.

I’m sure that many people regret that Excel doesn’t do bankers rounding, but many many more just want Excel to give exactly the same answer it always has, and where that means Lotus 123 compatibility, it is what it is.

---

<div class="post-metadata">

**Author:** ![DMC](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dmc/32/18049_2.png) [@DMC](https://boards.straightdope.com/u/DMC)\
**Post date:** [April 9, 2021, 5:12am UTC](https://boards.straightdope.com/t/what-does-really-round-off-to/939533/49 "2021-04-09T05:12:05Z")

</div>

> [@Melbourne](#):
>
> BA doesn’t have a ‘round’ function as such, but functions such as CINT use the rounding function that is part of the Windows API. And (since sometime last century), it’s bankers rounding.

[VBA actually does have a ROUND function](https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/round-function). As you noted it uses banker’s rounding, just like the rest of .NET.

I created a simple VBA function that performed a ROUND using the VBA version and returned it. When called in Excel, 1.15 returns 1.2, 1.25 also returns 1.2.

---

<div class="post-metadata">

**Author:** ![Melbourne](https://avatars.discourse-cdn.com/v4/letter/m/b5e925/32.png) [@Melbourne](https://boards.straightdope.com/u/Melbourne)\
**Post date:** [April 9, 2021, 5:48am UTC](https://boards.straightdope.com/t/what-does-really-round-off-to/939533/50 "2021-04-09T05:48:24Z")

</div>

> [@DMC](#):
>
> VBA actually does have a ROUND function

Showing my age. Most of my VBA was last century.

---

<div class="post-metadata">

**Author:** ![LSLGuy](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lslguy/32/5813_2.png) [@LSLGuy](https://boards.straightdope.com/u/LSLGuy)\
**Post date:** [April 9, 2021, 4:28pm UTC](https://boards.straightdope.com/t/what-does-really-round-off-to/939533/51 "2021-04-09T16:28:17Z")

</div>

> [@DMC](#):
>
> As you noted it uses banker’s rounding, just like the rest of .NET.

Bankers is the default, but beyond the many numeric type conversion functions and interfaces there’s

> **[Math.Round Method (System)](https://learn.microsoft.com/en-us/dotnet/api/system.math.round?view=net-5.0)**
>
> Rounds a value to the nearest integer or to the specified number of fractional digits.

Which takes an optional parameter to control the kind of rounding:

> **[MidpointRounding Enum (System)](https://learn.microsoft.com/en-us/dotnet/api/system.midpointrounding?view=net-5.0)**
>
> Specifies the strategy that mathematical rounding methods should use to round a number.

I expect you know all this, but I hunted up the cites for others who might be interested.

---

<div class="post-metadata">

**Author:** ![Siam\_Sam](https://avatars.discourse-cdn.com/v4/letter/s/d78d45/32.png) [@Siam\_Sam](https://boards.straightdope.com/u/Siam_Sam)\
**Post date:** [April 12, 2021, 3:04am UTC](https://boards.straightdope.com/t/what-does-really-round-off-to/939533/52 "2021-04-12T03:04:31Z")

</div>

I always round x.5 up to the next number. For example, 1.0-1.49 would round down to 1 (yes, 1.0 is already 1) and 1.5-1.99 would round up to 2. That’s how I was taught.

[Previous page](https://boards.straightdope.com/t/what-does-really-round-off-to/939533.md?page=2)
