The cell was formatted as Text when you entered the function.
Just re-formatting is not enough; format as number or General AND re-enter
the formula (F2, ENTER)
If both the formula bar and the cell display the formula rather than the
result, then the cell was formatted to Text before the formula was entered.
Clear the cell and re-enter the formula