# Calculated Fields

{% embed url="<https://youtu.be/i3M8-8Qk26Y>" %}

Calculated fields are a powerful feature for automatically updating contract text based on other field content.

Calculated fields work with numbers or text, and use the familiar Excel and Google Sheets formula syntax. (Instead of referring to a cell, like D23, simply use another field name, replacing any spaces with underscore (\_) characters. So a field named `Interest Rate` is referenced as `Interest_Rate` in the calculated field formula.)

Calculated fields are shown with gray backgrounds to distinguish them from fields where input is allowed, which have yellow backgrounds.

<figure><img src="/files/u0sHawaDSXl6sX1FtwUC" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/izdA3uoAfWG9IGsvyNfb" alt=""><figcaption></figcaption></figure>

## Overriding Calculated Fields

If you want to preserve the field structure but override the calculation to show a specific value or text, click the \[ ] Override calculated field checkbox, while will allow you to directly enter a value. You can also override a field by simply deleting it -- backspace through the field, or type right over it with the txt you want.

## Operators in Calculated Fields

You can use a number of operators inside a calculated field for&#x20;

1. **Multiplication Operator (`*`)**
   * Usage: Multiplies two numbers.
   * Example: `A * B` multiplies the value in A with B.
2. **Addition Operator (`+`)**
   * Usage: Adds two numbers.
   * Example: `A + B` adds the value in A to B.
3. **Division Operator (`/`)**
   * Usage: Divides the first number by the second.
   * Example: `A / B` divides A by B.
4. **Subtraction Operator (`-`)**
   * Usage: Subtracts the second number from the first.
   * Example: `A - B` subtracts B from A.
5. **Concatenation Operator (`&`)**
   * Usage: Concatenates two strings or values.
   * Example: `="Hello, " & Employee.Name & ","` would return a single string "Hello, John Doe," if `Employee` field contained a Person named John Doe.
6. **Exponentiation Operator (`^`)**
   * Usage: Raises the first number to the power of the second.
   * Example: `A ^ B` computes A raised to the power of B.
7. **Percent Operator (`%`)**
   * Usage: Converts a number to a percentage. (Works on a number, not a field.)
   * Example: `12%` converts 12 to its percentage equivalent; 0.12 if rendered as a Number and 12% if rendered as a Percent.
8. **Greater Than Operator (`>`)**
   * Usage: Compares two values, true if the first is greater.
   * Example: `A > B` is true if A is greater than B.
9. **Equal Operator (`=`)**
   * Usage: Compares two values for equality.
   * Example: `A = B` is true if A equals B.
10. **Less Than Operator (`<`)**
    * Usage: Compares two values, true if the first is less.
    * Example: `A < B` is true if A is less than B.
11. **Not Equal Operator (`!=`)**
    * Usage: Compares two values, true if they are not equal.
    * Example: `A != B` is true if A does not equal B.
12. **Greater Than or Equal Operator (`>=`)**
    * Usage: Compares two values, true if the first is greater or equal.
    * Example: `A >= B` is true if A is greater than or equal to B.
13. **Less Than or Equal Operator (`<=`)**
    * Usage: Compares two values, true if the first is less or equal.
    * Example: `A <= B` is true if A is less than or equal to B.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.alldrafts.com/alldrafts-documentation/fields/calculated-fields.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
