round
number | round
returns number
Rounds a number to the nearest integer.
{{ 2.7 | round }}
{{ 1.3 | round }}
{{ 2.7 | round }}
{{ 1.3 | round }}
Output
3
1
Anchor to Round to a specific number of decimal places
Round to a specific number of decimal places
You can specify a number of decimal places to round to. If you don't specify a number, then the round
filter rounds to the nearest integer.
{{ 3.14159 | round: 2 }}
{{ 3.14159 | round: 2 }}
Output
3.14
Was this page helpful?