# unequal() Function & Examples

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

## unequal

#### x != y

#### unequal(x, y)

Try it yourself:

```calculio
2+2 != 3
2+2 != 4
a = 3.2
b = 6-2.8
a != b
50cm != 0.5m
5 cm != 2 inch
```

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

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

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

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

---

## unequal: test whether values differ

**unequal(a, b)** returns true when two values are not equal. It is the logical complement of equality and keeps conditions readable.

## Examples

`unequal(2, 3)` is true, while `unequal(2, 2)` is false. For structured values, understand whether equality is deep or reference-based.

## Related comparisons

Use [equal](https://calcul.io/function/equal/index.md) for equality, [compare()](https://calcul.io/function/compare/index.md) for ordering, [equalText](https://calcul.io/function/equalText/index.md) for text, and [isZero()](https://calcul.io/function/isZero/index.md) for a zero-specific test. [abs()](https://calcul.io/function/abs/index.md) helps construct tolerance comparisons.

## Caveat

Exact inequality is often unsuitable for measured floating-point values. Compare the magnitude of a difference to a tolerance instead.

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