---
title: "Round ViewHelper <f:round>"
manual: "Fluid ViewHelper Reference"
version: "main"
permalink: "https://docs.typo3.org/permalink/t3viewhelper:typo3fluid-fluid-round@main"
source: "Global/Round.rst"
modified: "2026-09-17T05:12:06+00:00"
---

# Round ViewHelper `<f:round>`

The RoundViewHelper rounds a float value with the specified precision and rounding mode.
The ViewHelper mimics PHP's `round()` function.

| rounding modes | PHP < 8.4 | PHP >= 8.4 |
| --- | --- | --- |
| HalfAwayFromZero | Yes | Yes |
| HalfTowardsZero | Yes | Yes |
| HalfEven | Yes | Yes |
| HalfOdd | Yes | Yes |
| TowardsZero | No | Yes |
| AwayFromZero | No | Yes |
| NegativeInfinity | No | Yes |
| PositiveInfinity | No | Yes |

Go to the source code of this ViewHelper: [RoundViewHelper.php (GitHub)](https://github.com/TYPO3/Fluid/blob/main/src/ViewHelpers/RoundViewHelper.php).

## Arguments of the `<f:round>` ViewHelper

-   **precision**

    -   *Type:* int
    -   *Default:* 2

    Rounding precision

-   **roundingMode**

    -   *Type:* string
    -   *Default:* 'HalfAwayFromZero'

    Rounding mode

-   **value**

    -   *Type:* float

    The number that should be rounded
