---
title: "Excel formula generator and explainer"
method: POST
path: "/api/v1/ai/excel-formula"
tags: ["ai"]
---

# Excel formula generator and explainer

`POST /api/v1/ai/excel-formula`

## Request

- Base URL: `https://toolforte.com`
- URL: `https://toolforte.com/api/v1/ai/excel-formula`
- Auth: one of:
  - HTTP bearer
  - none

Turn a plain-language request into an Excel or Google Sheets formula, or explain a formula someone else wrote. Returns the formula, a step-by-step explanation, notes on pitfalls (absolute references, empty cells, text that looks like numbers) and alternatives. Handles the English and Dutch function names and argument separators (comma versus semicolon), XLOOKUP, INDEX/MATCH, SUMIFS, LET, LAMBDA, dynamic arrays and Google Sheets specifics such as ARRAYFORMULA and QUERY. Always check the result on a copy of your data. Costs 10 credits per call with an API key or a signed-in session, drawn from the same monthly balance as REST calls (1 credit) and renders (25). Without either, a small free demo allowance per day. Also available on the MCP server as generate_excel_formula.

## Request body

- object
  - `request` string, required: What the formula should do, in your own words, or the formula to explain.
  - `mode` 'generate' | 'explain', required: generate writes a formula from the request; explain describes what the pasted formula does.
  - `app` 'excel' | 'google-sheets', required: Target application. Function availability differs.
  - `locale` 'en' | 'nl', required: en uses English function names and commas; nl uses Dutch names (ALS, SOM.ALS, X.ZOEKEN) and semicolons.
  - `sample` string: Optional: a few rows of the sheet with headers, or the column layout (A = date, B = amount).

## Response `200`

The tool's answer plus metering

- object
  - `ok` boolean
  - `data` object
    - `formula` string, required
    - `explanation` string, required
    - `steps` string[], required
    - `notes` string[], required
    - `alternatives` object[], required
      - `formula` string, required
      - `when` string, required

## Other responses

- `400`: Missing or invalid request fields
- `429`: Daily demo allowance or monthly credits used up
- `502`: The model did not return a usable answer
- `503`: AI temporarily unavailable

---

[API](https://skmtc.dev/toolforte/apis/toolforte-api.md) · [All operations](https://skmtc.dev/toolforte/apis/toolforte-api/llms.txt) · [OpenAPI document](https://skmtc.dev/toolforte/apis/toolforte-api/revisions/4d814d484dfc?raw)
