Gen AI Cost Estimator

AI Strategy

Estimate the real cost of deploying a large language model in a customer-facing marketing application. Explore how system prompts, conversation length, and monthly volume drive your API bill — and discover the hidden “history tax” that most first-time builders miss.

👨‍🏫 Professor Mode: Guided Learning Experience

New to LLM cost modelling? Enable Professor Mode for step-by-step guidance through the history tax that makes long conversations cost far more than you expect!

WHAT ARE TOKENS?

LLM providers charge by tokens, not by words or characters. A token is roughly 4 characters of English text — about ¾ of a word. Punctuation, spaces, and special characters each consume tokens too.

Why tokens matter for cost

You pay separately for input tokens (everything you send to the model) and output tokens (everything it writes back). Output tokens are typically 2–4× more expensive per token than input tokens.

Try the live tokenizer

Type or paste any text to see how it splits into tokens. The rule of thumb matches the card above: a token is about ¾ of a word, so English prose runs at roughly 1.3 tokens per word. This simplified tokenizer counts each ordinary word as one token; the extra 0.3 comes from punctuation, numbers, contractions, and the occasional long/rare word that gets split in two. Hover any chip to see its type. For exact token counts, try OpenAI’s official tokenizer.

Quick rules:
  • Each word → 1 token (even long ones like "homeowners" or "campaign")
  • Each punctuation mark (. , ? ! % ") → +1 token
  • Contractions (don't → don + ' + t) → 3 tokens
  • Hyphenated words (cost-per-click → 5 tokens: 3 words + 2 hyphens)
  • Numbers separate from adjacent text (15% → 15 + %)
  • Very long words (>12 chars) may split into 2 pieces
0 characters → 0 estimated tokens ·
How LLM pricing works

Providers publish prices as dollars per 1 million tokens. The three main cost tiers roughly correspond to model capability:

Tier Example models Input ($/1M) Output ($/1M)
Budget GPT-4o-mini, Claude 3.5 Haiku, Gemini 2.0 Flash $0.15 $0.60
Mid-tier GPT-4o, Claude 3.5/3.7 Sonnet, Gemini 1.5/2.5 Pro $2.50 $10.00
Premium OpenAI o1, Claude 3 Opus, GPT-4.5 $15.00 $60.00

Prices as of 2026. Check provider pricing pages for current rates.

MARKETING SCENARIOS

Select a marketing use case above to auto-fill realistic parameter estimates, or set your own values manually in the inputs below.

INPUTS & SETTINGS

Design your AI-powered feature

Imagine you’re pitching an AI chatbot, writing assistant, or recommendation engine for a brand. These sliders let you estimate what it would actually cost to run. Don’t worry about getting every number exactly right — start with a scenario above, then tweak.

Think of this like choosing between economy, business, and first class. Cheaper models are fast and handle straightforward tasks (FAQ bots, subject-line generators). Premium models reason better but cost 100–200× more — use them only when the task truly demands it (complex strategy advice, nuanced creative writing).

Budget (GPT-4o-mini · Claude 3.5 Haiku · Gemini 2.0 Flash) — Input: $0.15/1M  |  Output: $0.60/1M

Every time a customer interacts with your AI feature, the conversation has several parts — think of the bill as being built from these building blocks:

Anatomy of an API Call

Each bar below is one turn in the conversation. Watch how each bar grows taller as previous messages pile up — that’s the history tax.

System prompt Context User messages Conversation history AI response (output)

Before any customer ever types a word, you’ve already written a set of instructions that tells the AI who it is and how to behave. For example: “You are a friendly product advisor for Patagonia. Always recommend items from our current catalog. Never discuss competitor brands.” This is called the system prompt, and it gets sent with every single message — so its length directly affects every call’s cost.

How long is a typical system prompt?

Simple bot (greeting + tone rules): ~100–200 tokens
Brand chatbot (persona + product guardrails + formatting rules): ~300–600 tokens
Complex agent (multi-step workflow + policies + examples): ~800–2,000 tokens

This is the live information your app sends alongside each message so the AI can give a relevant answer. Think of it like handing a salesperson a cheat sheet right before they talk to a customer. Examples:

  • E-commerce chatbot: the customer’s cart items, browsing history, and loyalty tier
  • Support bot: the customer’s open tickets and account details
  • Email assistant: the recipient’s name, segment, and past purchase data
  • No context needed: a simple FAQ bot that answers the same way regardless of who’s asking (set to 0)

What the customer actually types (or what your app sends on their behalf) each turn.

  • “What’s your return policy?” ≈ 8 tokens (short question)
  • “I bought a blue jacket last week and it doesn’t fit. Can I exchange it for a medium? I have my receipt.” ≈ 30 tokens
  • Pasting a product review for analysis ≈ 150–300 tokens

How much the AI writes back each turn. This is the most expensive part per token (output tokens cost 2–4× more than input tokens).

  • Quick answer (“Yes, you can return it within 30 days.”) ≈ 15 tokens
  • Short paragraph (product recommendation with reasons) ≈ 80–150 tokens
  • Detailed explanation (full email draft or analysis summary) ≈ 300–600 tokens

How many times the customer and the AI go back and forth in a single session. This is the most important cost driver that beginners miss — in a multi-turn chat, the entire conversation history gets resent every turn, so costs grow faster than you’d expect.

  • 1 turn: “Generate 3 subject lines for my spring email blast.” (one-shot, no follow-up)
  • 3–5 turns: Customer asks a question, gets a recommendation, asks a follow-up, refines their choice
  • 8–15 turns: Full support conversation — greeting, problem description, troubleshooting, resolution

How many total customer conversations your AI feature handles each month. This is your scale — it multiplies everything above.

  • 100–500: Internal team tool or pilot program
  • 1,000–10,000: Mid-size e-commerce site or B2B SaaS support bot
  • 50,000–500,000: Major consumer brand or high-traffic app

Compare against the human alternative

AI doesn’t exist in a vacuum — it replaces (or augments) work that humans currently do. Fill in these two numbers to see an ROI estimate.

What does it cost when a human handles this task instead? Include salary, overhead, and tools — not just a wage estimate.

  • $5–$15: Customer support ticket (blended cost with agent salary + tools)
  • $1–$5: Manually writing/editing a product description or email subject line
  • $15–$40: An analyst running a report or answering a data question
  • $0.10–$0.50: Basic data entry or classification task

What percentage of interactions can the AI handle without human help? Be realistic — even great chatbots escalate 20–40% of conversations.

  • 50–70%: Customer support chatbot (common queries answered, complex ones escalated)
  • 80–95%: Batch tasks like subject lines, descriptions, or sentiment tagging
  • 30–50%: Complex advisory tasks (analytics, strategy recommendations)

Real enterprise AI has tooling, developer maintenance, prompt tuning, and human QA audit costs beyond raw token fees.

  • $0: Pure toy / hobbyist script (API token spend only)
  • $300–$800: Batch marketing automation or content generation tooling
  • $1,000–$3,000: Customer-facing chatbot with vector database, logging, and human QA spot-checks

VISUAL OUTPUT

Cost vs. Volume

How monthly cost scales as conversation volume increases.

Model Tier Comparison

Same workload across budget, mid-tier, and premium models.

Input Token Breakdown

Where your input tokens go each conversation.

Sensitivity Analysis

Which parameter has the biggest impact when increased 50%?

COST SUMMARY

Cost / Interaction
$0.00
per individual message exchange
Cost / Conversation
$0.00
full session (all turns)
Monthly Cost
$0.00
at your projected volume
Annual Cost
$0.00
12-month projection
Input Tokens / Convo
0
total input (with accumulation)
Output Tokens / Convo
0
total generated by model

BUSINESS CASE

👤
Human handles it
$0
per month
vs
🤖
AI handles it
$0
per month
Per conversation: $0.00 (human) vs. $0.00 (AI)
Monthly Savings
$0
ROI
0%
Cost Reduction
0%

INTERPRETATION

Managerial Summary

Configure inputs above to see a plain-language cost estimate.


APA-style technical summary

Configure inputs above.

DIAGNOSTICS & ASSUMPTIONS

Key assumptions in this model
  • Token approximation: 1 token ≈ 4 characters of English text. Real BPE tokenizers vary by ±10–20% depending on language, code, and special characters.
  • Conversation accumulation: We assume the full message history is resent every turn (standard for the Chat Completions API). If your provider supports prompt caching or sliding-window context, actual costs may be lower.
  • Flat pricing: We use published list prices. Volume discounts, commitment tiers, and fine-tuning costs are not modeled.
  • Constant turn length: Every user message and AI response is assumed to be the same length. In practice there’s variance; the model gives the average-case cost.
  • No retries or tool calls: Failed requests, moderation re-prompts, function-calling round trips, and streaming overhead are not included.
What else should you consider?

This tool models the core cost drivers, but real-world deployment has additional dimensions worth thinking about:

  • Reverse budgeting: In practice, planning often starts from “I have $500/month — how many conversations can I afford?” Try working backward: adjust the volume slider until the monthly cost matches your budget constraint.
  • Cost reduction levers: Shorten your system prompt, improve your UI so users need fewer turns, use prompt caching (up to 50% off cached input tokens), and route simple queries to budget models while reserving mid-tier for complex ones.
  • Prices keep falling: LLM prices have dropped roughly 40–60% per year since 2023. A feature that looks expensive today at premium-tier pricing may be affordable on a mid-tier model in 12 months.
  • Multi-feature stacking: Most marketing teams don’t deploy just one AI feature. A chatbot + email personalization + sentiment analysis might combine to 3× the cost you see for a single tool. Run each scenario separately and sum them.
  • Hidden infrastructure costs: API fees are only part of the bill. You’ll also spend on engineering time, monitoring, guardrails/moderation, and handling edge cases the AI gets wrong.
The conversation accumulation formula

For a conversation with N turns:

Total input tokens =
  N × (system_prompt + context)
  + avg_user_msg × N(N+1) / 2
  + avg_ai_response × N(N-1) / 2

Total output tokens = N × avg_ai_response

The quadratic term in N is the key insight: as conversations get longer, costs grow faster than linearly because all previous messages must be resent. This is the “history tax.”