Skip to content

ODD function

Overview

ODD is a function of the Math and Trigonometry category that rounds a number up (away from zero) to the nearest odd integer.

Usage

Syntax

ODD(number) => odd

Argument descriptions

  • number (number, required). The number that is to be rounded to the nearest odd integer.

Additional guidance

  • ODD rounds away from zero, meaning:
    • Positive numbers are rounded up to the next odd integer.
    • Negative numbers are rounded down (toward negative infinity) to the next odd integer.
  • If the number argument is already an odd integer, ODD returns it unchanged.
  • Since zero is considered an even number, the ODD function returns 1 when number is 0.

Returned value

ODD returns a number that is the nearest odd integer, rounded away from zero.

Error conditions

  • In common with many other IronCalc functions, ODD propagates errors that are found in its argument.
  • If no argument, or more than one argument, is supplied, then ODD returns the #ERROR! error.
  • If the value of the number argument is not (or cannot be converted to) a number, then ODD returns the #VALUE! error.
  • For more information about the different types of errors that you may encounter when using IronCalc functions, visit our Error Types page.