# equalText() Function & Examples

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

## equalText

#### equalText(x, y)

Try it yourself:

```calculio
equalText("Hello", "Hello")
equalText("a", "A")
equal("2e3", "2000")
equalText("2e3", "2000")
equalText("B", ["A", "B", "C"])
```

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

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

---

## equalText(): Comparing Text Values

**equalText()** compares text values and returns a boolean result. It is useful for labels, user choices, parsed fields, and rule-based calculator logic where lexical equality—not numerical equivalence—is required.

## Text is not a number

Whitespace, capitalization, and formatting can affect a text comparison depending on the input values. Normalize imported text deliberately before comparison when your rule should ignore such differences. Use [compareText()](https://calcul.io/function/compareText/index.md) when you need an ordering, and [concat()](https://calcul.io/function/concat/index.md) when constructing a standardized label.

Do not use text equality to compare numerical results. Use [equal()](https://calcul.io/function/equal/index.md) for exact numeric values, or a tolerance approach with [abs()](https://calcul.io/function/abs/index.md) for decimals. Combine text conditions with [and()](https://calcul.io/function/and/index.md) or [or()](https://calcul.io/function/or/index.md) to write clear validation rules.

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