VynarisEarly beta
Get my API key

LLM API Cost Spreadsheet Template: Free Layout + Price CSVs

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
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.

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:

For OpenRouter's models API, LiteLLM's JSON and models.dev, and the unit traps when you merge them, see our LLM pricing resources roundup. Per-model rates are also on /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.

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.

ColumnExampleWhat goes in it
tasksupport replyThe unit you sell or budget: a reply, a document, an agent run
model_idgpt-6.1-terraMust match a Rates row
fresh_input1,000Input tokens not served from cache
cached_input2,000Input tokens read from cache (system prompt, docs)
output400Output tokens, including reasoning tokens
tasks_per_month50,000Your volume
retry_rate5%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
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:

To see the same task shape across many models without maintaining formulas, the Vynaris cost 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.

What are LLM Tokens and API Prices? (Beginner Friendly) (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 Opens the OpenAI tokenizer tool
  • 6:25 Shows one word splitting into several tokens
  • 7:38 Multiplies 139 input tokens by the input price
  • 9:16 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:

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?

JobUseWhyWatch out for
A budget you will defendThe four-tab layout aboveEvery number has a date and a sourceYou maintain it
A quick estimate todayAiloitte Excel modelFree, editable, caching and routing leversClaude and OpenAI only
Unit economics per userAI API Cost Calculator LiteCost per user and gross margin built inSix models
Live prices in a sheetAICostBudget prices.csvImports with one formula, dated rowsThird-party lag
Tracking OpenAI actualsn8n workflow 6002Fills a sheet from the Admin API$9, OpenAI only
Agent-heavy productsDownloadSuite simulatorAgent-loop and invoice tabsPaid, 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.