Token problems: 11 of 20

By Prof. Tom Yeh

Published: 2026-05-28

URL: https://www.byhand.ai/p/library-agents-tokens-comparing-calls


Token problems: the workbook

  1. Count the Tokens
  1. Subword Splitting
  1. Punctuation Counts
  1. Tokens per Word
  1. Will It Fit?
  1. The Price of a Call
  1. Two Kinds of Token
  1. Input or Output?
  1. The Two-Part Bill
  1. End-to-End Call Cost
  1. Comparing Three Calls
  1. The Average Call
  1. The System Prompt
  1. The System Prompt Tax
  1. Calls in a Budget
  1. Tokens on a Budget
  1. How Long Will It Take?
  1. The Split Matters
  1. Pricing per Million Tokens
  1. Tokens from the Bill

Which call costs more when total tokens are the same? You have to cost all three to find out. The split between input and output matters more than the total: a call heavy on input can cost far less than one heavy on output, even with identical token counts. Agents face this trade-off every time they choose how much context to include and how long a reply to request.

Problem

Three calls each process 1,000 tokens, but split them differently. Input is priced at 2 cents per 100 tokens; output at 8 cents per 100 tokens. Fill in the cost for each call, then rank them cheapest to most expensive.

Fill the cost column

Rank cheapest to most expensive

Practice 1

Three calls each process 1,200 tokens, but split them differently. Input is priced at 2 cents per 100 tokens; output at 8 cents per 100 tokens. Fill in the cost for each call, then rank them cheapest to most expensive.

Fill the cost column

Rank cheapest to most expensive

Practice 2

Three calls each process 1,500 tokens, but split them differently. Input is priced at 2 cents per 100 tokens; output at 8 cents per 100 tokens. Fill in the cost for each call, then rank them cheapest to most expensive.

Fill the cost column

Rank cheapest to most expensive


Next: 12. The Average Call