CSV token and OpenAI Batch API calculator

CSV Token Counter & Batch API Cost Calculator

Choose a CSV or XLSX text column, count tokens per row, find costly outliers, and compare OpenAI Standard API with Batch API cost.

Quick answer

CSV Token Counter and Batch API Cost Calculator counts estimated input tokens across one selected CSV or spreadsheet column and returns row-level statistics plus Standard and Batch API cost estimates for the supported OpenAI model. Empty cells count as zero, expected output tokens are added per row, and provider batch rates determine the discounted comparison.

How it is calculated: Batch cost = (input tokens ÷ 1,000,000 × provider batch input rate) + (output tokens ÷ 1,000,000 × provider batch output rate)

Count tokens across a CSV or spreadsheet

Upload a CSV or XLSX file, choose the text column, and inspect a per-row token estimate without combining unrelated spreadsheet fields. Empty cells remain in the dataset and count as zero tokens.

Find expensive prompts before running them

Use the average, median, P95, maximum, and most expensive rows to spot long support tickets, RAG chunks, evaluation examples, or bulk prompts that can dominate API spend.

Estimate Standard vs Batch API cost

For the supported OpenAI model, compare input and expected output cost at Standard API rates with the matching canonical Batch API rates. For monthly request planning beyond one file, use the AI API Cost Calculator.

When should you use this calculator?

Use it for customer support tickets, RAG chunks, evaluation datasets, content generation queues, enrichment jobs, classification workloads, and other asynchronous bulk prompts. For one prompt or document, keep using the generic AI Token Calculator.

Frequently asked questions

How do I count tokens in a CSV file?

Upload the CSV, select the column that contains prompts or other text, and the calculator will estimate token count for every row while keeping empty cells as zero-token rows.

Can I count tokens in an Excel file?

Yes. Upload an XLSX workbook and choose the text column from the first worksheet. Legacy XLS files should be exported to CSV or XLSX first.

What is the difference between Standard API and Batch API cost?

Standard API cost uses the model's regular input and output rates. For eligible asynchronous OpenAI workloads, Batch API cost uses the corresponding canonical Batch input and output rates.

Does OpenAI Batch API cost less?

For the supported OpenAI model in this calculator, the canonical Batch rates are 50% below Standard rates. Model support and official billing rules should still be verified before production use.

Are uploaded files sent to AI providers?

No. Token analysis runs locally in your browser, and file contents are not sent to OpenAI, Anthropic, Google, or AICostBudget servers.

How can I find the most expensive rows in my dataset?

Review the Most expensive rows table, which ranks up to ten rows by estimated Standard API input plus expected output cost and shows each row number, text preview, and token count.