# or() Function & Examples

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

## or

#### x or y

#### or(x, y)

Try it yourself:

```calculio
true or false
false or false
0 or 4
```

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

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

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

---

## or: combine logical conditions

**or(a, b)** is true when at least one condition is true. It expresses alternatives such as “the value is missing or negative” in a readable rule.

## Truth-table idea

Only false OR false is false. All other combinations are true. This is logical OR, distinct from [bitOr()](https://calcul.io/function/bitOr/index.md), which combines integer bits.

## Build validation rules

Combine it with [and](https://calcul.io/function/and/index.md), [not](https://calcul.io/function/not/index.md), and [equal](https://calcul.io/function/equal/index.md). Predicates such as [isNegative()](https://calcul.io/function/isNegative/index.md) and [isZero()](https://calcul.io/function/isZero/index.md) make conditions clear.

## Caveat

Use parentheses in longer expressions so that the intended precedence is obvious, especially when AND and OR are mixed.

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