MedCalc  ## Arithmetic operators

The arithmetic operators, in order of precedence, are:

 ^ Exponentiation - Negation * / Multiplication, division + - Addition, subtraction

## Relational operators

Relational operators compare two numbers or two strings. The result is a logical value expressed as a number, either 1 (=TRUE), or 0 (=FALSE). The relational operators, in order of precedence, are:

 = Equality <> Inequality < Less than > Greater than <= Less than or equal to >= Greater than or equal to

## Order of operators

When arithmetic and relational operators are combined in one expression, the arithmetic are performed first. Use parentheses to change the order in which the operations are performed. Operations within parentheses are performed first.

• B6<5+3 returns 1 if the contents of B6 is less than 8, otherwise this expression returns 0.
• 5+3*(A1>3) returns 8 if cell A1 contains a value greater than 3 (since A1>3 = TRUE = 1). If A1 contains 3 or a number less than 3, this expression returns 5 (A1>3 = FALSE = 0).