Menu
Coddy logo textTech

Why Token Counts Matter

Part of the Fundamentals section of Coddy's AI Prompts journey — lesson 9 of 23.

Tokens Matter for Three Reasons

Cost. AI services charge per token, with output tokens costing more than input. A chatty prompt generating a long response costs more than a concise one.

Speed. The AI generates output one token at a time. Shorter responses come back faster.

Context limits. Every model has a maximum token capacity per conversation (the context window). Long prompts leave less room for responses.

This is why efficiency matters. "Can you please help me by explaining in great detail what the capital city of France is?" (~20 tokens) gets the same answer as "What is the capital of France?" (~7 tokens) — at lower cost and faster speed.

For reference, GPT-4o costs about $2.50/$10 per million input/output tokens; Claude Sonnet runs $3/$15. A million tokens is roughly 750,000 words, so even casual use adds up.

Cheat sheet

Tokens impact three key aspects of AI usage:

Cost: AI services charge per token, with output tokens costing more than input tokens.

Speed: AI generates output one token at a time, so shorter responses are faster.

Context limits: Models have maximum token capacity per conversation (context window). Longer prompts leave less room for responses.

Efficient prompts reduce costs and improve speed. For example:

  • "Can you please help me by explaining in great detail what the capital city of France is?" (~20 tokens)
  • "What is the capital of France?" (~7 tokens)

Both get the same answer, but the second is more efficient.

Pricing reference: GPT-4o costs ~$2.50/$10 per million input/output tokens; Claude Sonnet costs ~$3/$15. A million tokens ≈ 750,000 words.

Try it yourself

This lesson doesn't include a code challenge.

quiz iconTest yourself

This lesson includes a short quiz. Start the lesson to answer it and track your progress.

All lessons in Fundamentals