# Round
{: .no_toc }

Returns a number rounded to a specified number of decimal places.

Syntax: **Round(** *expression* [ **,** *numdecimalplaces* ] **)**

*expression*
: *required* Numeric expression being rounded.

*numdecimalplaces*
: *optional* Number indicating how many places to the right of the decimal are included in the rounding. If omitted, integers are returned by the **Round** function.

> [!NOTE]
> **Round** uses banker's rounding (round half to even): when the value is exactly half-way between two possible rounded results, it rounds toward the nearest even digit. For example, `Round(0.5, 0)` returns `0`, and `Round(1.5, 0)` returns `2`.

> [!NOTE]
> `Round(-0.5)` returns negative zero, which equals 0. A 32-bit build prints it as `0`, as VB6 does, and a 64-bit build as `-0`, as 64-bit VBA does. See [Double](/tB/Core/Double.md#arithmetic-and-overflow).

### Common Errors

| Error | When |
|---|---|
| [5 (`&H5`)](/Reference/Run-time-Errors.md#5), *Invalid procedure call or argument* | *numdecimalplaces* rounds to a negative number<br>*numdecimalplaces* is greater than 22 and *expression* is a **Single**, **Double** or **Date**, or a string |
| [94 (`&H5E`)](/Reference/Run-time-Errors.md#94), *Invalid use of Null* | *numdecimalplaces* is **Null** |

### Example

```tb check_build
Debug.Print Round(0.12335, 4)    ' 0.1234
Debug.Print Round(0.12345, 4)    ' 0.1234
Debug.Print Round(0.12355, 4)    ' 0.1236
Debug.Print Round(0.12365, 4)    ' 0.1236
Debug.Print Round(0.00005, 4)    ' 0
```

### See Also

- [Int](/tB/Modules/Conversion/Int.md) function
- [Fix](/tB/Modules/Conversion/Fix.md) function
- [CInt](/tB/Modules/Conversion/CInt.md) function
- [CLng](/tB/Modules/Conversion/CLng.md) function
