--- title: "round(bigdecimal a, b)" slug: "math-round-big-decimal" updated: 2026-08-13T13:23:29Z published: 2026-08-13T13:23:29Z canonical: "docs.lobstersoftware.com/math-round-big-decimal" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # round(bigdecimal a, b) This function rounds value **a** to **b** decimal places from the decimal separator. Because the data type BigDecimal is used internally, rounding errors, as they can happen in function round(a), are avoided. A non-numerical value **a** is interpreted as 0. See examples below. ## Parameters | Parameter | Description | | --- | --- | | a | Numerical value. | | b | (optional) Number of decimal places. Default: 0 | ## Examples | Parameter a | Parameter b | Result | | --- | --- | --- | | 2.135 | 0 | 2 | | 2.135 | 1 | 2.1 | | 2.135 | 2 | 2.14 | | abc | 2 | 0.00 |