← Back to article

Equation 12 · The Real Cost of Running Claude in Production, Beyond the Per-Token Price

What does this equation mean?

C=pin(n+τ)+pcww+pcrr+pout(y+z)aC = \frac{p_{\mathrm{in}}(n + \tau) + p_{\mathrm{cw}} w + p_{\mathrm{cr}} r + p_{\mathrm{out}}(y + z)}{a}

Read the formula alongside the article passage below. Each part has a deeper page with its role in the equation, the supporting passage and nearby citations.

Start withp_in(n + τ) + p_cw w + p_cr r + p_out(y + z)
Divide bya
This relates toC
How to read the two sides of this formula. Follow the article passage for the meaning of each quantity.

This equation states an equality: the expressions on both sides have the same value under the article’s assumptions. Read the equation part by part below; each part has a contextual explanation and a link to its mathematical background.

Read it piece by piece

CC

Symbol C

C is part of the quantity the equation computes from the expression on the right.

Understand this part →

pinp_{\mathrm{in}}

Symbol p_in

pip_in occurs above the fraction bar. The numerator is divided by the entire denominator below it.

Understand this part →

nn

Symbol n

n occurs above the fraction bar. The numerator is divided by the entire denominator below it.

Understand this part →

τ\tau

Symbol τ

the fixed tool and system-prompt tokens added regardless of content.

Understand this part →

pcwp_{\mathrm{cw}}

Symbol p_cw

pcp_cw occurs above the fraction bar. The numerator is divided by the entire denominator below it.

Understand this part →

ww

Symbol w

w occurs above the fraction bar. The numerator is divided by the entire denominator below it.

Understand this part →

pcrp_{\mathrm{cr}}

Symbol p_cr

pcp_cr occurs above the fraction bar. The numerator is divided by the entire denominator below it.

Understand this part →

rr

Symbol r

r occurs above the fraction bar. The numerator is divided by the entire denominator below it.

Understand this part →

poutp_{\mathrm{out}}

Symbol p_out

pop_out occurs above the fraction bar. The numerator is divided by the entire denominator below it.

Understand this part →

yy

Symbol y

y occurs above the fraction bar. The numerator is divided by the entire denominator below it.

Understand this part →

zz

Symbol z

z occurs above the fraction bar. The numerator is divided by the entire denominator below it.

Understand this part →

aa

Symbol a

a is one of the signed contributions combined to compute the quantity on the left.

Understand this part →

=

=

The expressions on both sides represent the same quantity under the stated assumptions.

Understand this part →

See an illustrated explanation →
fraction

fraction

Divide the expression above the line by the one below it.

Understand this part →

See an illustrated explanation →
addition

addition

Add the term after the plus sign to the term or group before it.

Understand this part →

subscript

subscript

The lower label selects a particular version, component, or indexed member of the quantity. For example, x₀ and xₜ can be values at different positions.

Understand this part →

pin(n+τ)+pcww+pcrr+pout(y+z)p_{\mathrm{in}}(n + \tau) + p_{\mathrm{cw}} w + p_{\mathrm{cr}} r + p_{\mathrm{out}}(y + z)

Numerator: p_in(n + τ) + p_cw w + p_cr r + p_out(y + z)

The complete quantity above the fraction bar.

Understand this part →

How to interpret it

With a fixed numerator, increasing a nonzero denominator reduces the fraction. Read it with the definitions, units, and assumptions supplied by the article.

What the article says around this equation

Collect the pieces above into one expression and the gap between a rate card and an invoice becomes explicit. For a single request, let n be new input tokens, w cache-write tokens, r cache-read tokens, y visible output tokens, z billed-but-invisible thinking tokens, and τ\tau the fixed tool and system-prompt tokens added regardless of content. Let pinp_{\mathrm{in}} , pcwp_{\mathrm{cw}} , pcrp_{\mathrm{cr}} , and poutp_{\mathrm{out}} be the published rates, and let a ∈\in (0, 1] be the fraction of attempts an application accepts without needing to reissue the request, because it was neither truncated at the maximum-tokens cap nor lost to a timeout, an overload error, or a rate limit. Cost per accepted…
Read the full surrounding passage
Collect the pieces above into one expression and the gap between a rate card and an invoice becomes explicit. For a single request, let n be new input tokens, w cache-write tokens, r cache-read tokens, y visible output tokens, z billed-but-invisible thinking tokens, and τ\tau the fixed tool and system-prompt tokens added regardless of content. Let pinp_{\mathrm{in}} , pcwp_{\mathrm{cw}} , pcrp_{\mathrm{cr}} , and poutp_{\mathrm{out}} be the published rates, and let a ∈\in (0, 1] be the fraction of attempts an application accepts without needing to reissue the request, because it was neither truncated at the maximum-tokens cap nor lost to a timeout, an overload error, or a rate limit. Cost per accepted response is then C=pin(n+τ)+pcww+pcrr+pout(y+z)aC = \frac{p_{\mathrm{in}}(n + \tau) + p_{\mathrm{cw}} w + p_{\mathrm{cr}} r + p_{\mathrm{out}}(y + z)}{a}. Every term in the numerator is priced directly by the rate card, and every one is documented above. The denominator is not on any rate card. It is the assumption a pure per-token estimate makes implicitly by omission: that acceptance equals one, that nothing is ever truncated, dropped, or retried. Nothing examined for this article suggests that assumption holds for a real production system, and the mechanisms above — an undersized token cap, a dropped connection on a long request, an overload window during a spike — are all documented ways acceptance falls below one in practice.

Read the equation in its article →

For background, read the article’s source list.

Return to The Real Cost of Running Claude in Production, Beyond the Per-Token Price

See this formula across 1 published context →

Browse the mathematical compendium →