tokenkarma is in beta. Expect rough edges, and your feedback shapes what we fix next.
Credits Guard

How we calculate your savings

The Savings Ledger only claims what it can defend. It separates what we can measure from what we can only estimate, labels each one, and never mixes in savings that someone else made for you. Here is the exact method behind every number.

1. Measured savings

When a request hits your budget gate, Claude Code asks you to confirm before spending. If you walk away instead (no resubmission within a few minutes), that request was genuinely avoided. We value it at your session's recent average turn cost: the rolling average of what your last turns in that session actually cost, at that model's rates.

This is the most honest category on the ledger. It counts only requests that were blocked and then abandoned, valued from your own recent usage, not from a hypothetical worst case.

2. Estimated savings

The Eco profile asks the model for concise output: no recaps, no re-explaining code it just wrote, diffs instead of full files. To estimate what that saves, we compare your Eco turns against a baseline of what your output normally looks like:

  • Your baseline is the rolling average of output tokens per turn from your own Normal-profile sessions.
  • While your personal baseline is still building (fewer than 20 Normal turns), we use an anonymized global baseline instead, and the ledger labels it as such. It is never passed off as your own.
  • Estimated savings = (baseline output tokens per turn minus actual Eco output tokens per turn), valued at the model's output rate.

This is an estimate, and we treat it like one. It is counted separately from measured savings, and every total that includes it says so explicitly: the ledger always shows "incl. $X estimated".

3. Cache savings (context only)

Anthropic's prompt caching bills cached input at a fraction of the full input price. The ledger shows what that caching saved versus full price, because it is useful context when you read your spend.

It is never counted in your tokenkarma total. That saving is made by Anthropic's infrastructure, not by anything tokenkarma did, and claiming it would inflate the number. It stays in its own section, clearly marked as context.

Pricing data

Every dollar value is computed from a versioned, server-side pricing table that mirrors the providers' published API rates. Prices are never hardcoded in the app or the guard binary. When a provider changes its rates, the table is updated server-side and every client picks it up, with the table's version and last-updated date visible in the app. If a model is missing from the table, its turns are flagged as unpriced rather than silently guessed.

Where the numbers come from

Token counts are read from your local Claude Code transcripts, on your machine. The transcript files never leave your machine. Only aggregate numbers sync to your dashboard: token counts, computed costs, model ids and timestamps. No prompt or response content is read or stored by the sync layer.

More on how tokenkarma handles your data: security and privacy policy.