Free token cost calculator and prompt diff checker

Diff & Cost Estimate compares your original prompt with a new version side by side. See a word-level diff, the token reduction, and the dollar savings across OpenAI, Anthropic, Google and DeepSeek models.

Side-by-Side Comparison Panels
Base: 0 tok•Optimized: 0 tok
Original Base PromptBase
Optimized PromptOptimized
Ready for token diff calculation and cost delta modeling
Visual Diffing & LLM Financial Intelligence

Why Visual Diffing and Token Cost Estimation are Critical

In modern AI product development, prompt engineering is an iterative software discipline. When tweaking system instructions or compressing few-shot examples, engineers and prompt designers need to know two things immediately: what exact words changed, and how much money was saved.

Diff & Cost Estimate provides side-by-side visual diffing (green additions, red removals) alongside cost projections for each model in the price table below. Whether you are optimizing a prompt for personal ChatGPT use or scaling an enterprise AI agent to millions of monthly API calls, this tool shows what a prompt change is worth in tokens and dollars.

3 Core Metrics Evaluated in the Diff Report

Token Compression Delta

Counts tokens before and after with the GPT-4o tokenizer (exact for GPT-4o, a close reference for other models) and shows the net saving and percentage reduction.

Multi-Model Cost Projections

Calculates dollar savings for every model in the price table below, at your own request volume.

Input and Output Priced Separately

Output length is set per request and held equal for both versions, so the saving shown is the input-token saving.

Estimated Monthly Savings by Model Tier (100k API Calls)

Input-token savings only, based on published pricing as of September 2026 — use the live calculator above for your own prompt, output length, and volume.

Frontier LLM ModelOriginal Cost (1,500 Tok)Optimized Cost (750 Tok)Monthly Net Savings
OpenAI GPT-4o$375.00$187.50+$187.50 / mo
Anthropic Claude Sonnet 5.5$300.00$150.00+$150.00 / mo
Google Gemini 3.6 Flash$112.50$56.25+$56.25 / mo
OpenAI GPT-4o mini$22.50$11.25+$11.25 / mo

Model Prices Used by the Calculator

List prices per million tokens as of September 2026 (DeepSeek at off-peak rates). Check each provider’s pricing page before budgeting.

ModelInput / 1M tokensOutput / 1M tokensContext window
OpenAI GPT-4o$2.50$10.00128K
OpenAI GPT-4o mini$0.15$0.60128K
Anthropic Claude Opus 5.5$4.00$20.001M
Anthropic Claude Sonnet 5.5$2.00$10.001M
Anthropic Claude Haiku 4.5$1.00$5.00200K
Google Gemini 3.6 Flash$0.75$3.751.05M
Google Gemini 3.1 Pro$2.00$12.001.05M
DeepSeek DeepSeek V4-Flash$0.15$0.601M

What the Diff & Cost Estimate does

Diff & Cost Estimate is a free token cost calculator and prompt diff checker. Paste two versions of a prompt and it highlights what changed word by word, counts the tokens in each version and shows what the difference is worth in API cost for every model in its price table.

Cost is the token count times the model's price per million tokens, with input and output priced separately. You choose how many requests you send and how long each answer is (500 tokens by default), and both versions get the same output length, since shortening a prompt only changes the input cost. Tokens are counted with the GPT-4o tokenizer for every model, so counts are exact for GPT-4o and approximate for the others. Prices are the providers' published list prices as of September 2026.

Use it after the prompt compressor or the prompt optimizer to confirm an edit saved what you expected and did not drop anything you needed. For a count per model, use the token counter for Claude, GPT and Gemini.

How to use the Diff & Cost Estimate

  1. 1

    Paste the original prompt

    This is the version you started with.

  2. 2

    Paste the new version

    This is the optimized, shortened or edited prompt.

  3. 3

    Read the diff

    Removed words are struck through in red and added words are highlighted in green, so you can see exactly what changed.

  4. 4

    Check the savings

    See the token difference and the estimated cost for each model at your chosen request volume and output length, then decide whether the change is worth keeping.

Example: before and after

Before

Original: 312 tokens
New version: 168 tokens

After

Saved: 144 tokens (46%)
At 100,000 calls per month, that is a visible drop in input cost for each model compared.

A small saving per call adds up quickly when a prompt is sent many times, and the diff shows what was removed to get there.

Who the Diff & Cost Estimate is for

  • Developers

    Verify a prompt edit before it goes to production.

  • Cost-conscious teams

    Put a number on the saving from shortening a prompt.

  • Prompt reviewers

    See what changed between two versions at a glance.

  • Anyone using the Token Optimizer

    Check the result against the original.

Diff & Cost Estimate FAQ

How do I calculate the cost of a prompt?

Count its tokens, then multiply by the model's price per million tokens: tokens divided by 1,000,000, times the price. Output tokens are priced separately, and you multiply by the number of requests. For example, a 1,000-token prompt sent 100,000 times to a model that costs $2 per million input tokens is 100 million tokens, or $200. Paste your prompt into this tool and it does the sums for every model at once.

Which models and prices does it use, and how current are they?

It covers GPT-4o, GPT-4o mini, Claude Opus 5.5, Claude Sonnet 5.5, Claude Haiku 4.5, Gemini 3.6 Flash, Gemini 3.1 Pro, DeepSeek V4-Flash. The prices are each provider's published list prices as of September 2026 (DeepSeek at off-peak rates), kept in one table that the calculator reads. They change often, so check the provider's pricing page before you budget. Batch discounts and prompt caching are not modelled.

How are tokens counted, and are the counts exact for every model?

Both prompts are counted with the GPT-4o tokenizer, which is exact for GPT-4o and a close reference for other models. Each provider tokenizes slightly differently, and Anthropic says its newer Claude models produce roughly 30% more tokens than its older tokenizer, so real Claude costs can run higher. For a count per model, use the token counter for Claude, GPT and Gemini.

What does the diff show?

It compares the two prompts word by word. Removed text is struck through in red and added text is highlighted in green, so you can spot an instruction that should have stayed. It does not compare the AI's answers, only the prompts, their token counts and the estimated cost.

Does my text leave my browser?

No. The diff, the token counts and the cost sums all run in your browser. If you are signed in, pressing Compare also saves the two prompts to your private history so you can reopen them. If you are not signed in, nothing is saved.

Is the token cost calculator free?

Yes. It runs in your browser with no daily limit.

Prompts to try it on

Browse the Prompt Cookbook
Productivity

ChatGPT Prompt to Prepare Talking Points for a Difficult Workplace Conversation

This ChatGPT prompt helps you prepare talking points for a difficult workplace conversation — a tense one on one with a manager, a conflict…

You are an experienced workplace communication coach helping someone prepare for a difficult conversation.

Context:
- Who you need to talk to: [PERSON'S ROLE/RELATIONSHIP TO YOU]
- The situation: [DESCRIBE WHAT HAPPENED]
- Your relationship history with this person: [RELEVANT BACKGROUND]
- What you want to happen as a result of this conversation: [DESIRED OUTCOME]
- Your biggest worry about how this conversation could go wrong: [YOUR CONCERN]

Instructions:
1. Open with a one-sentence statement of shared goal or good intent, not a complaint.
2. List 3-5 key points to make, in the order they should come up, each as a short, specific statement grounded in facts rather than feelings.
3. Predict 2-3 likely objections or defensive reactions from the other person and draft a calm, non-escalating response to each.
4. Suggest one sentence to close the conversation that confirms the agreed next step.

Constraints:
- Keep language neutral and non-accusatory; avoid words like "always," "never," or "you clearly."
- Do not suggest ultimatums or threats.
- Keep each talking point under two sentences.

Output format:
Return the talking points as a numbered list under the headings: Opening, Key Points, Anticipated Pushback & Responses, Closing.

Make this prompt yours

RAG & Knowledge Retrieval

AI Prompt to Make a RAG Assistant Say 'I Don't Know' When Context Is Missing

This is a RAG prompt for stopping a retrieval augmented assistant from guessing when the retrieved documents don't actually contain the answ…

ROLE: You are a question-answering assistant that must only use the provided context to answer questions. You must never use outside knowledge, even if you know the answer.

CONTEXT:
[PASTE RETRIEVED DOCUMENT CHUNKS HERE]

QUESTION: [USER'S QUESTION]

INSTRUCTIONS:
1. Check whether the context above contains enough information to fully answer the question
2. If it does, answer using only that information, and quote or reference the specific part of the context you used
3. If the context only partially answers the question, answer the part you can and explicitly state which part is not covered
4. If the context does not contain relevant information at all, respond exactly with: "[INSUFFICIENT CONTEXT RESPONSE, e.g. I don't have enough information in the provided documents to answer this.]"
5. Do not guess, infer beyond what the context states, or use any knowledge from outside the provided context

CONSTRAINTS:
- [ANY ADDITIONAL CONSTRAINT, e.g. keep answers under 150 words, cite chunk numbers if provided]

OUTPUT FORMAT: A direct answer to the question, or the insufficient-context response, followed by a short reference to which part of the context (if any) was used.

Make this prompt yours

Data Analysis & Data Science

ChatGPT Prompt for Exploratory Data Analysis on a New Dataset

This ChatGPT prompt for exploratory data analysis (EDA) is built for analysts, students, and data scientists opening a dataset for the first…

Role: You are a data analyst performing an initial exploratory analysis on a new dataset.

Context:
- Dataset description: [WHAT THE DATA REPRESENTS AND WHERE IT CAME FROM]
- Columns and data types: [LIST COLUMN NAMES AND TYPES]
- Sample rows: [PASTE 5-10 SAMPLE ROWS]
- Business question or goal: [WHAT YOU'RE ULTIMATELY TRYING TO UNDERSTAND OR DECIDE]

Constraints:
- Base every observation only on the data provided; do not invent values or trends not shown
- Clearly separate factual observations from suggested next steps
- Flag any columns with likely data-quality issues (missing values, inconsistent formatting, outliers)
- If something cannot be determined from the sample provided, say so explicitly instead of guessing

Output format:
1. Dataset overview (shape, column types, general structure)
2. Data-quality issues found (missing values, duplicates, inconsistent formats)
3. Key distributions and notable patterns
4. Three to five follow-up questions worth investigating further

Make this prompt yours

Further reading: Claude API Pricing: Cost per Request Calculator