# Formulas

Formulas use the Values of numeric Entries (textual and multiline ones aren't used, nor struck ones).

**Card** → **Enable Formula**

After enabling the Formula, the Card shows a Total. In contrast to Entries, the Total has no input connector, it only has output.

Any kind of Card can have a Formula. The next video uses an Auxiliary Root Card, but that's just for illustration purposes.

## Presets

**Card** → **Formula Presets**

To remove a preset, re-click the active preset button.

## Nested Cards are like parentheses

Deeper Cards compute before their parent(s).

Hypotenuse = (a^{2} + b^{2})^{½}

## Nested Card Operator

Like Entries, Nested Cards have an operator (unless they are the first Formula item).

## Operator Precedence

Formulas follow arithmetic rules. $1+2\times 3=7$

Exponentiation is right associative. $2^2^3=256$

## Alternatives to Formulas

The next document is about integrating JavaScript code. Therefore, you can also write formulas like:

function (card) { const radius = card.children[0].value; return 2 * Math.PI * radius; }