## Documentation Index

Access the complete documentation index at:
https://www.zoho.com/books/kb/llms.txt

Use this file to discover all available documentation pages before proceeding.

[Back](./)

# When should I use the Formula data type in a custom field?

The **Formula** data type in a custom field allows you to create a formula that performs calculations using predefined functions, fields, and operators.

**Scenario:** Zylker, a courier package distribution company operating in India, has varying shipment durations depending on the state or city. To calculate the exact delivery date, Zylker creates a custom field to enter the number of days for the shipment and uses a formula custom field to add these days to the invoice date.

Here’s how this can be configured:

### Step 1: Create a Custom Field for Shipment Days

1.  Go to the **Settings** at the top right corner of the page and go to _Sales_.
2.  Choose _Invoices_ and select the **Field Customization** tab.
3.  Click **\+ New Custom Field** on the top right corner of the page.
4.  Enter the label name (say, **Number of days for the shipment**) and data type as **Number**.
5.  Enter the relevant details and click **Save**.

### Step 2: Create a Formula Data Type based Custom Field for Shipment Date

1.  Click **\+ New Custom Field** again.
2.  Enter the label name (say, **Shipment Date**) and choose data type as **Formula**.
3.  Enter the relevant details and choose **Date** from the dropdown against **Output Data Type**.
4.  In the **Formula** field, select **ADDDATE** from functions. Choose the **invoice date** and the created custom field (**number of days for the shipment**) from the fields column. Then add **“DATE”** to return the date.
5.  Click **Save**.

Read more about functions available in the [formula custom field](https://www.zoho.com/books/help/settings/formula.html).

* * *