EVEN
Rounds a number away from zero to the nearest even integer.
The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.
Syntax
=EVEN(number)
Arguments
| Argument | Type | Required | Default |
|---|---|---|---|
number | number | Required | — |
Remarks
- Values already equal to an even integer stay unchanged.
- Positive and negative values both move away from zero.
0returns0.
Examples
Evaluate a negative number with a fractional part.
Formula =EVEN(-4.7)
Expected result -6
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Compare the result on the positive side of zero.
Formula =EVEN(4.7)
Expected result 6
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Evaluate the function at the zero boundary.
Formula =EVEN(0)
Expected result 0
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
A nonnumeric text value cannot be used as the number.
Formula =EVEN("invalid")
Expected result #VALUE!
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Round a positive number to even
Formula =EVEN(3)
Expected result 4
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Round a negative number away from zero
Formula =EVEN(-1.1)
Expected result -2
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Related functions
FAQ
Does EVEN ever round toward zero?
No. It always rounds away from zero to the nearest even integer.