# Formulas

Formulas are dynamic calculations that are easy to follow and update.

## Create a Formula

**To create a new Formula Block**, Click the `+`

button next to an empty line in your notebook and select `Formula`

from the menu that appears. Alternatively, you can use the shortcut by typing `=`

on an empty paragraph.

**Create a Calculation**:- Just type any calculation or formulas and check its result on the right.

**Define a Variable Name**:- Assign variable names to your formulas to make them easier to read and reuse.
- Variable names are case-sensitive.
- Variable names cannot include spaces.
- Variable names cannot start with a number.
- Variable names must be unique.

**Supported Operations**:- Formulas support common mathematical operations such as addition
`+`

, subtraction`-`

, multiplication`*`

, division`/`

, and exponents`**`

. - Parentheses can be used to group operators and define evaluation order. Example:
`($100 + 5%) / $200`

.

- Formulas support common mathematical operations such as addition
**Percentages**:- Percentages are fully supported in formulas. Simply add a
`%`

symbol to any number to define a percentage. Example:`5%`

- Convert a calculation result into a percentage with the keyword
`in`

. Example:`30/200 in %`

. - Apply a percentage using multiplication. Example:
`400$ * 5%`

- Add a percentage using addition. Example:
`400$ + 5%`

- Subtract a percentage using subtraction. Example:
`400$ - 5%`

- Combine percentages using addition or subtraction. Example:
`10% + 5%`

- Percentages are fully supported in formulas. Simply add a
**Shorthand Notation**:- Formulas support abbreviated ways of representing numbers and writing expressions:
- You can use number multipliers, including thousands
`K`

, millions`M`

, and billions`B`

. - You can use currency symbols such as
`$5`

or`5$`

to represent different currencies.

Check Supported Currencies →

**Built-in Functions**:- Decipad has a series of built-in function that you can use to simplify your calculations.

Learn more about Built-in Functions →

- Decipad has a series of built-in function that you can use to simplify your calculations.
**Add Units**:- To add units you can just type them. For example enter
`$10`

or`5oz`

to indicate a currency or measurement.

Learn more about Units →

- To add units you can just type them. For example enter
**Reference Results**:- You can easily drag and drop these calculations into your text to explain them.

Learn more about Inline Results → - You can easily drag and drop these calculations into your formulas to reuse them.

- You can easily drag and drop these calculations into your text to explain them.
**Create a Result Widget**:- Click the formula result to create a result widget on your notebook to showcases an important number.

## Number Inputs

You can define number inputs to reuse on your calculations to make your calculations easier to follow and update.

**To create a new Number Input Block**, Click the `+`

button next to an empty line in your notebook and select `Number Input`

from the menu that appears. Alternatively, you can use the shortcut by typing `=`

on an empty paragraph.

**Add a Unit**:- To add units to number inputs, just type them as text next to your numbers.
- For example, you can enter
`$10`

or`5oz`

to indicate a currency or measurement. - Alternatively, you can click on the unit picker
`▼`

and select one from the list or define custom one on the`add custom unit`

field.

**Define a Variable Name**:- Assign variable names to your formulas to make them easier to read and reuse.
- Variable names are case-sensitive.
- Variable names cannot include spaces.
- Variable names cannot start with a number.
- Variable names must be unique.

## Formulas on Tables

- You can add formulas to a table by clicking on any cell and starting with the equals sign (
`=`

). - Alternatively, you can add formulas to a column by clicking on the column
`▼`

and selecting`Formula`

.