---
title: "LLM API Cost Spreadsheet Template: Free Layout + Price CSVs"
description: "A free LLM API cost spreadsheet needs four tabs: rates, tasks, forecast and actuals. Here is the layout, live price CSVs and the templates worth copying."
canonical: https://vynaris.com/blog/llm-api-cost-spreadsheet-template
author: "Dhrumil Barot"
author_bio: "Dhrumil is an AI inference and LLM infrastructure expert. Dhrumil built Vynaris to make model access, routing and pricing simple and transparent for developers."
published: 2026-11-13
updated: 2026-11-13
---

# LLM API Cost Spreadsheet Template: Free Layout + Price CSVs

Published 2026-11-13 · By [Dhrumil Barot](https://vynaris.com/about#founder), Founder

A free LLM API cost spreadsheet needs four tabs: rates, tasks, forecast and actuals. Here is the layout, live price CSVs and the templates worth copying.

**TL;DR:** The best free LLM API cost spreadsheet template is four tabs: Rates, Tasks, Forecast and Actuals. Fill Rates from a live price CSV with one `IMPORTDATA` formula, price each task by token type, then check the forecast against the provider's cost API every month. Below are the exact columns, formulas and current prices, plus the free and paid templates we checked on 2026-11-13.

An LLM API cost spreadsheet template turns per-token prices into cost per task and a monthly forecast. You can copy the layout on this page into Google Sheets or Excel in about 15 minutes, and it stays current because the Rates tab reads a public price CSV that lists 191 models (last verified 2026-11-10). If you would rather start from someone else's file, the free options are an editable Excel model from Ailoitte and a six-model sheet published on dev.to on 2026-11-12. One GitHub sheet that ranks well still uses November 2024 prices, so skip it for budgeting.

![The template's four tabs feed each other, and Actuals checks the forecast against the real bill](https://cdn.sanity.io/images/u1qdn8dx/production/b38e36bc5f7cdabdb000bce070ee8fd6bfd1fd5e-1344x326.png?w=1440&fit=max&auto=format)

*Rates refresh hourly; Actuals is where you find out the forecast was wrong.*

## Is there a free LLM cost spreadsheet?

Yes. Three are free and worth opening, and two paid ones are cheap enough to judge on features. We opened each page on 2026-11-13; prices inside any template are only as fresh as its last edit.

- [Ailoitte AI Cost Calculator](https://www.ailoitte.com/library/ai-cost-calculator/): free, no signup, and delivered as an editable Excel model. It covers Claude and OpenAI models only, with prices "as of 8 October 2026", and it adds caching, batch and routing levers plus spend caps with alerts at 50%, 80% and 100%.
- [AI API Cost Calculator Lite (dev.to post)](https://dev.to/v0it3ch/your-ai-agents-token-bill-grows-quadratically-heres-the-math-and-a-free-calculator-dib): a free Excel and Google Sheets file with cost per query, cost per user and gross margin for six models with dated, cited prices. The post is also the clearest write-up of why agent loops grow quadratically (see the forecast section).
- [n8n workflow 6002 Google Sheets template](https://n8n.io/workflows/6002-track-openai-admin-api-usage-and-costs-automatically-with-google-sheets/): the sheet is a free copy, but the n8n workflow that fills it costs $9. It pulls OpenAI Admin API usage and costs every 3 days by default. It does not cover Anthropic or Gemini, it was last updated 9 months ago, and manual runs can append duplicate rows.
- [DownloadSuite AI API and LLM Token Cost Simulator](https://downloadsuiteco.com/products/ai-api-token-cost-simulator/): paid, $9.99 at the time of checking. It has a pricing matrix, an agent-loop forecaster and an invoice ledger in Sheets and Excel. It applies a flat 90% caching discount, which is wrong for models where the cache-read rate differs (Claude Sonnet 5.5 reads cache at 0.05x, not 0.1x).
- [danielrosehill/LLM-API-Price-Estimates](https://github.com/danielrosehill/LLM-API-Price-Estimates): a GitHub repo that ranks for this query. Its data is dated 12 and 29 November 2024 and covers GPT 4o and Claude 3.5, so use it to see a layout, not a price.
- Etsy listings for "LLM API cost tracker" sheets exist, but their pages returned HTTP 403 to us, so we could not check what is inside.

What the templates miss: none of them handles DeepSeek's peak and off-peak rates or OpenAI's long-context tier, and only the n8n one compares the forecast against a real bill. The layout below covers both.

## Where can I get LLM prices as CSV or JSON?

Use a provider page for any number you bill against, and a machine-readable file for the sheet. These are the sources a spreadsheet can actually read:

- [AICostBudget prices.csv](https://aicostbudget.github.io/ai-api-pricing-data/api/v1/prices.csv): the one CSV we found that Google Sheets can import directly. On 2026-11-13 it had 191 rows (153 with `status` = active), 32 columns, prices in USD per 1M tokens, and a `last_verified_at` date and `official_source_url` on every row. Unknown prices are left empty, never 0.
- [AICostBudget prices.json](https://aicostbudget.github.io/ai-api-pricing-data/api/v1/prices.json): the same data as JSON, for Excel Power Query or a script. The [GitHub repo](https://github.com/aicostbudget/ai-api-pricing-data) documents the schema and has a price-change feed.
- [OpenAI API pricing](https://developers.openai.com/api/docs/pricing): append `.md` to the URL and you get the price tables as Markdown, which is far easier to parse than the HTML. It lists short and long context, Batch, Flex, Fast and Ultrafast rows separately.
- [Anthropic pricing](https://platform.claude.com/docs/en/about-claude/pricing): base, cache write, cache read and batch rates for every Claude model, plus the 1.1x multiplier for US-only inference.
- [DeepSeek pricing](https://api-docs.deepseek.com/quick_start/pricing): peak and off-peak rates, with the exact UTC hours.

For OpenRouter's models API, LiteLLM's JSON and models.dev, and the unit traps when you merge them, see our [LLM pricing resources](https://vynaris.com/blog/llm-pricing-resources) roundup. Per-model rates are also on [/models](https://vynaris.com/models).

## What columns does an LLM API cost spreadsheet template need?

A cost-per-task model needs one row per model on the Rates tab and one row per task shape on the Tasks tab. Separate the token types, because they are priced differently: fresh input, cached input, output and, when you use it, cache writes.

**Tab 1: Rates.** One row per model. Keep the capture date next to every price.

```csv
model_id,provider,input_per_1m,cached_input_per_1m,output_per_1m,batch_discount,long_context_from,price_date,source
claude-sonnet-5-5,anthropic,2.00,0.10,10.00,0.5,,2026-11-13,platform.claude.com/docs/en/about-claude/pricing
claude-haiku-5-5,anthropic,0.10,0.01,0.50,0.5,100000,2026-11-13,platform.claude.com/docs/en/about-claude/pricing
gpt-6.1-terra,openai,1.00,0.05,5.00,0.5,272000,2026-11-13,developers.openai.com/api/docs/pricing
gpt-6-luna,openai,0.10,0.01,0.50,0.5,272000,2026-11-13,developers.openai.com/api/docs/pricing
deepseek-flash,deepseek,0.30,0.006,1.20,,,2026-11-13,api-docs.deepseek.com/quick_start/pricing
```

Paste that into cell A1 of a new tab and use Data > Split text to columns. These are standard list prices; DeepSeek's row is the peak rate, and its off-peak rate is half.

**Tab 2: Tasks.** One row per task shape and model. Measure tokens from real requests (the `usage` object in each API response), not from word counts.

| Column | Example | What goes in it |
| --- | --- | --- |
| task | support reply | The unit you sell or budget: a reply, a document, an agent run |
| model_id | gpt-6.1-terra | Must match a Rates row |
| fresh_input | 1,000 | Input tokens not served from cache |
| cached_input | 2,000 | Input tokens read from cache (system prompt, docs) |
| output | 400 | Output tokens, including reasoning tokens |
| tasks_per_month | 50,000 | Your volume |
| retry_rate | 5% | Extra calls from retries and validation failures |

The cost formula, with Rates looked up by `model_id` in column B:

```
cost_per_task = (C2 * XLOOKUP(B2, Rates!A:A, Rates!C:C)
               + D2 * XLOOKUP(B2, Rates!A:A, Rates!D:D)
               + E2 * XLOOKUP(B2, Rates!A:A, Rates!E:E)) / 1000000

monthly_cost  = cost_per_task * F2 * (1 + G2)
```

`XLOOKUP` works in both Google Sheets and current Excel. Here is what that produces for one support reply on five models:

![One support reply priced on five models: Sonnet 5.5 costs about 19 times more than Haiku 5.5 or GPT-6 Luna](https://cdn.sanity.io/images/u1qdn8dx/production/0135548c31a1c8a43d7063b11e6e169824a9a919-1344x502.png?w=1440&fit=max&auto=format)

*Same tokens, about a 19x spread between the most and least expensive row.*

The derivation for the first row: 1,000 × $2 + 2,000 × $0.10 + 400 × $10 = $6,200 per million tasks, or $0.0062 per task. At 50,000 tasks a month that is $310.00, and $325.50 with a 5% retry rate. GPT-6.1 Terra is 1,000 × $1 + 2,000 × $0.05 + 400 × $5 = $0.0031 per task, so $155.00 a month. The cheap rows only matter if they pass your quality bar on that task; the sheet shows the price of each option, not which one is good enough.

## How do I keep the prices current automatically?

Import the CSV into a hidden tab and point the Rates tab at it. In Google Sheets, put this in cell A1 of a tab named `feed`:

```
=IMPORTDATA("https://aicostbudget.github.io/ai-api-pricing-data/api/v1/prices.csv")
```

Then replace the typed prices in Rates with lookups. Column B of the feed is `model_id`, I is `input`, J is `output`, K is `cached_input` and R is `last_verified_at`:

```
input_per_1m        =XLOOKUP($A2, feed!$B:$B, feed!$I:$I, "missing")
cached_input_per_1m =XLOOKUP($A2, feed!$B:$B, feed!$K:$K, "missing")
output_per_1m       =XLOOKUP($A2, feed!$B:$B, feed!$J:$J, "missing")
price_date          =XLOOKUP($A2, feed!$B:$B, feed!$R:$R, "missing")
```

Google recalculates `IMPORTDATA` every hour, so the sheet follows the file within an hour of each update. The file itself is maintained by a third party: its own date said 2026-11-10 when we pulled it three days later. Before a budget goes to finance, compare two or three rows against the provider pages. In Excel, Data > Get Data > From Web loads the same CSV or JSON URL through Power Query.

Watch two kinds of empty cell. An empty `cached_input` means the provider publishes no cache price for that model, so don't treat it as free. A "missing" result means your `model_id` is spelled differently from the feed; the feed uses the provider's API names, such as `claude-sonnet-5-5`.

## How do I forecast monthly LLM spend?

Multiply cost per task by volume, then add the modifiers that a flat price list hides. The Forecast tab needs one row per month and these adjustments:

- **Growth.**  `tasks_next_month = tasks_this_month * (1 + growth)`. Forecast each task shape separately, because they rarely grow at the same rate.
- **Batch share.** Anthropic's Batch API and OpenAI's Batch and Flex rows cost 50% of standard on input and output. If 30% of your work can wait, price that 30% at half. Our [OpenAI Batch API guide](https://vynaris.com/blog/how-to-use-openai-batch-api) covers what can wait.
- **Time of day.** DeepSeek's off-peak rates are half its peak rates. Peak is 01:00 to 04:00 and 06:00 to 10:00 UTC, Monday to Friday. Add a `peak_share` column and blend the two rates.
- **Long context.** OpenAI charges more above 272K input tokens: GPT-6.1 Terra goes from $1.00 to $2.00 input and from $5.00 to $7.50 output. Claude Haiku 5.5's $0.10 input rate applies to prompts up to 100,000 tokens. Flag any task whose input is near those lines.
- **Cache writes.** Anthropic bills a 5-minute cache write at 1.25x the input price and a 1-hour write at 2x. A cache that expires between requests turns your cheap cached reads into repeated writes. Our [prompt caching break-even analysis](https://vynaris.com/blog/prompt-caching-break-even-2026) shows when caching pays.
- **Agent loops.** Each agent step resends the whole conversation, so input grows with the square of the step count. The dev.to post gives `total_input = n * system + adds * n * (n - 1) / 2`: a 12-step run with a 2,000-token system prompt that adds 800 tokens a step sends 76,800 input tokens, not the naive 33,600. Model agent runs with that formula, not as 12 equal calls.
- **Residency.** Anthropic's US-only inference adds 1.1x to every token category on Claude 4.6 and later models.

To see the same task shape across many models without maintaining formulas, the [Vynaris cost calculator](https://vynaris.com/calculator) prices one task at current rates. When the cheapest model that passes your quality bar differs by task, Vynaris can route each request to it through one OpenAI-compatible API, and your spreadsheet then forecasts per task rather than per model.

## How do I count the tokens for each task?

Count them from real traffic when you can, and with a tokenizer when you are still planning. Every API response includes a `usage` object with input, cached and output token counts. Log 50 to 100 real requests per task shape and use the median. Before launch, paste a representative prompt and response into the provider's tokenizer, which is the method this video walks through.

Video: [What are LLM Tokens and API Prices? (Beginner Friendly)](https://www.youtube.com/watch?v=7zbuEULTHIs&t=350s) (Eamonn Cottrell)

A spreadsheet educator pastes a prompt into OpenAI's tokenizer, reads the token count, and multiplies it by per-million prices in a side calculator, then repeats it for the model's reply. The prices shown are from June 2025; the method is what carries over.

- [5:58](https://www.youtube.com/watch?v=7zbuEULTHIs&t=358s) Opens the OpenAI tokenizer tool
- [6:25](https://www.youtube.com/watch?v=7zbuEULTHIs&t=385s) Shows one word splitting into several tokens
- [7:38](https://www.youtube.com/watch?v=7zbuEULTHIs&t=458s) Multiplies 139 input tokens by the input price
- [9:16](https://www.youtube.com/watch?v=7zbuEULTHIs&t=556s) Counts the 162-token reply and prices the output

The video's prices are old, so take the counting method and use the rates from your Rates tab. Reasoning models add hidden reasoning tokens to output; the `usage` object counts them, a tokenizer on the visible reply does not.

## How do I check the spreadsheet against the real bill?

Pull actual costs from the provider every month and put them next to the forecast on the Actuals tab. Both large providers expose cost data through an admin API:

- **OpenAI:**  `GET /v1/organization/costs` returns daily buckets (`bucket_width=1d`, up to 180 buckets per call) and can group by `project_id` or `line_item`. It needs an Admin API key, not a normal project key. See the [OpenAI costs endpoint reference](https://developers.openai.com/api/reference/resources/organization/subresources/audit_logs/methods/get_costs).
- **Anthropic:**  `/v1/organizations/cost_report` groups by `workspace_id` and `description`, and pages with `has_more` and `next_page`. It needs an Admin API key (`sk-ant-admin01-...`) and is not available to claude.ai Team plans or individual Console accounts. Anthropic now marks it legacy and recommends its newer Usage and Cost Analytics API. See the [Anthropic Usage and Cost API docs](https://platform.claude.com/docs/en/build-with-claude/usage-cost-api).

```bash
curl "https://api.openai.com/v1/organization/costs?start_time=1793491200&bucket_width=1d&limit=31&group_by=line_item" \
  -H "Authorization: Bearer $OPENAI_ADMIN_KEY" -H "Content-Type: application/json"
```

The Actuals tab needs three columns per month: forecast, actual and `variance = actual / forecast - 1`. A variance above about 10% usually means one of three things: retries you did not count, a cache hit rate lower than you assumed, or a task shape that drifted (longer prompts, longer answers). Fix the Tasks row, not the Rates row.

## Which template or source should I use?

| Job | Use | Why | Watch out for |
| --- | --- | --- | --- |
| A budget you will defend | The four-tab layout above | Every number has a date and a source | You maintain it |
| A quick estimate today | Ailoitte Excel model | Free, editable, caching and routing levers | Claude and OpenAI only |
| Unit economics per user | AI API Cost Calculator Lite | Cost per user and gross margin built in | Six models |
| Live prices in a sheet | AICostBudget prices.csv | Imports with one formula, dated rows | Third-party lag |
| Tracking OpenAI actuals | n8n workflow 6002 | Fills a sheet from the Admin API | $9, OpenAI only |
| Agent-heavy products | DownloadSuite simulator | Agent-loop and invoice tabs | Paid, flat cache discount |

## Start here: a 15-minute path

1. Create a sheet with tabs named `feed`, `Rates`, `Tasks`, `Forecast` and `Actuals`.
2. Put the `IMPORTDATA` formula in `feed!A1` and the lookups in `Rates`.
3. Add your top three task shapes to `Tasks`, with token counts from real `usage` objects.
4. Add the batch, peak and long-context adjustments that apply to you in `Forecast`.
5. At month end, paste the provider's cost data into `Actuals` and fix whatever drifted.

The tradeoff: a sheet you build yourself takes 15 minutes more than a downloaded one, but it is the only kind where you know where every number came from.

## FAQ

### Is there a free LLM API cost spreadsheet template?

Yes. Ailoitte's AI Cost Calculator is a free editable Excel model for Claude and OpenAI models, and the "AI API Cost Calculator Lite" linked from a 2026-11-12 dev.to post is a free sheet for six models. The four-tab layout on this page is free too and reads live prices from a CSV.

### Can Google Sheets pull LLM prices automatically?

Yes. `=IMPORTDATA("https://aicostbudget.github.io/ai-api-pricing-data/api/v1/prices.csv")` loads 191 model prices into a tab, and Google refreshes `IMPORTDATA` every hour. `IMPORTDATA` reads CSV and TSV only, so JSON price files need a script or Excel's Power Query instead.

### How often do LLM API prices change?

Often enough that a sheet without dates goes wrong within weeks. In the AICostBudget file on 2026-11-13, 38 of 191 models were marked deprecated, retired or preview rather than active. Keep `price_date` on every Rates row and recheck anything older than a month.

### Why does my spreadsheet estimate not match my invoice?

Usually because of token types the sheet ignores: cache writes, reasoning tokens counted as output, retries, or long-context prices above 272K tokens on OpenAI. Compare the Actuals tab grouped by line item, and the gap usually points to one of those.

### What is a good default retry rate to budget?

Measure it from your logs; there is no published standard. Until you have data, a 5% overhead is a reasonable placeholder, and the worked example above shows what that adds: $15.50 a month on a $310.00 Sonnet 5.5 workload.

## About the author

[Dhrumil Barot](https://vynaris.com/about#founder), Founder. Dhrumil is an AI inference and LLM infrastructure expert. Dhrumil built Vynaris to make model access, routing and pricing simple and transparent for developers. [LinkedIn](https://www.linkedin.com/in/bdhrumil) · [X](https://x.com/fyidhrumil)
