Token problems: 17 of 20

By Prof. Tom Yeh

Published: 2026-05-28

URL: https://www.byhand.ai/p/library-agents-tokens-how-long-will-it-take


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

Why does a short reply sometimes take longer than reading a large document? A call's time has two parts. Input is processed in parallel, every token in one pass, so even a large input clears quickly. Output is generated one token at a time, each waiting on the one before. For agents, this means latency is driven almost entirely by how much the agent writes, not by how much it reads.

Problem

A call sends 2,000 input tokens and gets back 200 output tokens. The model reads input at 1,000 tokens per second and writes output at 40 tokens per second. How long does the call take?

Time to read the input

Time to write the output

Add the two times

Practice 1

A call sends 3,000 input tokens and gets back 300 output tokens. The model reads input at 1,000 tokens per second and writes output at 50 tokens per second. How long does the call take?

Time to read the input

Time to write the output

Add the two times

Practice 2

A call sends 4,000 input tokens and gets back 120 output tokens. The model reads input at 2,000 tokens per second and writes output at 30 tokens per second. How long does the call take?

Time to read the input

Time to write the output

Add the two times


Next: 18. The Split Matters