Documentation/Calc Functions/EVEN

    From The Document Foundation Wiki


    Function name:

    EVEN

    Category:

    Mathematical

    Summary:

    Rounds a positive number up to the next even integer and a negative number down to the next even integer.

    Syntax:

    EVEN(Number)

    Returns:

    Returns an integer value, that is the rounded version of the original number.

    Arguments:

    Number is a real number, or a reference to the cell containing that number, that is to be rounded.

    • If Number is non-numeric, then EVEN reports a #VALUE! error.

    Additional details:

    • Returns an even integer whose sign is the same as that of Number. The value returned should have the minimum absolute value that is greater than or equal to the absolute value of Number.
    • If Number is equal to 0, then EVEN returns 0.

    Examples:

    Formula Description Returns
    =EVEN(2.3) Rounds up 2.3 to the next even integer. 4
    =EVEN(D1) where cell D1 contains the number 1.9. Rounds up 1.9 to the next even integer. 2
    =EVEN(0) Returns 0 without rounding. 0
    =EVEN(−0.5) Rounds down -0.5 to the next even integer. −2
    =EVEN(−5.3) Rounds down -5.3 to the next even integer. −6

    Related LibreOffice functions:

    ODD

    ODF standard:

    Section 6.16.30, part 2

    Related (or similar) Excel functions:

    EVEN