# not() Function & Examples

Use the not() logical function in Calcul.io. Review its syntax, edit working examples, understand the result, and explore related math functions.

## not

#### not x

#### not(x)

Try it yourself:

```calculio
not true
not false
not 2
not 0
```

[and](https://calcul.io/function/and/index.md)

[or](https://calcul.io/function/or/index.md)

[xor](https://calcul.io/function/xor/index.md)

---

## Invert a Boolean condition with not

**not(x)** returns the logical opposite of x. It converts true to false and false to true, making exclusion conditions clear in formulas and filters.

## Examples

Use not to retain values that do not meet a condition, often alongside [filter](https://calcul.io/function/filter/index.md). Combine it with [and](https://calcul.io/function/and/index.md) and [or](https://calcul.io/function/or/index.md) to build compound decisions. [unequal](https://calcul.io/function/unequal/index.md) is often clearer than negating an equality test.

## Caveats

Be deliberate about truthiness and precedence: put compound conditions in parentheses before negating. Not is for logical values, not numeric complement; use [unaryMinus](https://calcul.io/function/unaryMinus/index.md) to negate a number. Validate mixed user input with [typeOf](https://calcul.io/function/typeOf/index.md).

[All functions](https://calcul.io/functions/index.md)
