---
schema_version: "1"
id: d7dc2e6e620571ccf98932a433628824e0e7bcf55ed4fca0ae27c0f18c0ed47b
title: round(n[, m])
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/analytics/bi_dev_guide_saql/guides/reference/bi-saql-functions-math-round.md
canonical_url: https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-functions-math-round.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 8ecf22df27a834b9e75a104177bdc01b049c58095eca4005d773a4a083b26e53
products:
  - Analytics SAQL Developer Guide
  - analytics
---

# round(n[, m])

Returns the value of _n_ rounded to _m_ decimal places. _m_ can be negative, in which case the function returns _n_ rounded to -_m_ places to the left of the decimal point. If _m_ is omitted, it returns _n_ rounded to the nearest integer. For tie-breaking, it follows round half way from zero convention. _n_ can be any real numeric value in the range of -1e308 \<= n \<= 1e308. _m_ can be an integer value between -15 and 15, inclusive. This function can only be used in a `foreach` statement.

**note:** If the _n_ value scale is lost on data upload, _m_ can only work with the scale present in the dataset. It can't add scale back to the value.

## Example

```nolang
q = foreach q generate round(Price, 2) as Price;
```

## Example

```nolang
round(-1.2345) = -1
```

```nolang
round(2.355, 2) = 2.36
```

```nolang
round(-3455.8, -1) = -3460
```

```nolang
round(2.35, 3) = 2.35
```
