# Generate Formulas Using AI

> Part of the NocoDB documentation (Product docs > NocoAI). Index of all pages: https://nocodb.com/llms.txt. Any docs page is available as Markdown by adding `.md` to its URL.

URL: https://nocodb.com/docs/product/noco-ai/create-formula
Last updated: 2026-09-25

Use natural language prompts to generate formulas with NocoAI.

## Overview

Writing formulas can be complex and time-consuming. With **NocoAI**, you can now describe the logic you need in plain English, and have a formula generated for you automatically.

This is perfect for non-technical users, power users who want to speed up formula creation, or anyone looking to avoid syntax errors.

## Steps to Generate Formulas Using AI

1. Add a **Formula Field**

   In your table, add field and select **Formula** as the type.

2. Click **Formula Helper**

   Inside the formula editor, click **✨ Formula Helper** to open the prompt-based generation interface.

3. **Describe** the Logic in Natural Language

   Write a simple prompt explaining what the formula should do.
   *Example*:

   > Show "✅ Done" if Status is "Completed", else show "⏳ In Progress".

4. Review and click **Generate**

   NocoAI will generate the formula based on your prompt in the formula editor. You can review and modify if needed.

5. Click **Save**

   Once you're happy with the result, save the field.

<div style={{ display: "flex", gap: "1rem" }}>
  <img src="/img/v2/noco-ai/create-formula-1.png" alt="Formula field using AI - Step 1" style={{ width: "50%", borderRadius: "8px", boxShadow: "0 0 8px rgba(0,0,0,0.05)" }} />

  <img src="/img/v2/noco-ai/create-formula-2.png" alt="Formula field using AI - Step 2" style={{ width: "50%", borderRadius: "8px", boxShadow: "0 0 8px rgba(0,0,0,0.05)" }} />
</div>

## Tips for Better Formula Suggestions

* **Be precise in your prompt**

  Mention exact field names and values where possible.
  *Example*:

  > Calculate number of days between Start Date and End Date.

* **Use conditional phrases**

  Help the AI understand intent.
  *Example*:

  > If Priority is "High" and Status is not "Completed", show "⚠️ Urgent".

* **Refer to data types clearly**

  Indicate if you’re working with dates, numbers, checkboxes, or text.
  *Example*:

  > Add 7 days to the Created Date.

## Example Prompts and Outcomes

| Prompt                                             | Resulting Formula (Example)                       |
| -------------------------------------------------- | ------------------------------------------------- |
| If Status is "Done", show "✅", else show "⏳"       | `IF({Status} = "Done", "✅", "⏳")`                 |
| Show the number of days between Start and End Date | `DATETIME_DIFF({End Date}, {Start Date}, "days")` |
| If Due Date is past today, mark as "Overdue"       | `IF({Due Date} < TODAY(), "Overdue", "")`         |
| Combine First Name and Last Name into one field    | `CONCAT({First Name}, " ", {Last Name})`          |

## What’s Next

Once your formula field is ready, you can:

* Use **[NocoAI View Suggestions](/docs/product/noco-ai/create-view)** to visualize data based on these formulas
* Create **[Fields using AI](/docs/product/noco-ai/create-field)** to automatically generate relevant fields for your table

NocoAI simplifies complex logic so you can stay focused on building great workflows!

## Availability

* AI-assisted formula generation is available on **NocoDB Cloud** (Plus plan and above), where usage is metered by [credits](/docs/product/workspaces/credits). On self-hosted deployments, it requires configuring your own AI integration (Business plan and above).

---

## Related pages

- [What NocoAI can do](https://nocodb.com/docs/product/noco-ai/capabilities.md): The full list of actions the NocoAI assistant can take in NocoDB, the role each one needs, and what NocoAI cannot do yet.
- [Create Base Using AI](https://nocodb.com/docs/product/noco-ai/create-base.md): Quickly generate a fully-structured base using natural language prompts with NocoAI
- [Create Tables Using AI](https://nocodb.com/docs/product/noco-ai/create-table.md): Use NocoAI to auto-generate tables and relationships based on natural language prompts.
- [Create Views Using AI](https://nocodb.com/docs/product/noco-ai/create-view.md): Learn how to auto-generate useful views for your table using NocoAI.
- [Filter Records Using AI](https://nocodb.com/docs/product/noco-ai/create-filter.md): Use natural language to filter your table data with NocoAI.
- [Create Fields Using AI](https://nocodb.com/docs/product/noco-ai/create-field.md): Automatically generate relevant fields for your tables using NocoAI.
- [Create Options Using AI](https://nocodb.com/docs/product/noco-ai/create-options.md): Automatically generate field options for select fields using NocoAI.
