AI planning / CLEARBYTE

Cached Input Cost Calculator

Mixed input cost equals cached tokens at the cache-read rate plus remaining tokens at the uncached rate. A cache hit fraction is an input assumption, not a guaranteed provider behavior.

Isolated tool · network access blocked

Formula & method

Cost = total input × [(1 − cached share) × uncached rate + cached share × cache-read rate] ÷ 1,000,000.

Worked example

InputValue
Total input tokens1,000,000
Share billed as cache reads60 %
Uncached input rate per million3 ¤
Cache-read rate per million0.5 ¤
Result
ResultValue
Mixed input charge1.5 ¤
All-uncached comparison charge3 ¤
Difference from comparison charge1.5 ¤

Compare scenarios

The first input changes while the other example inputs stay fixed. These are arithmetic scenarios, not forecasts.

Compare scenariosTotal input tokens Mixed input chargeAll-uncached comparison chargeDifference from comparison charge
−20%800,0001.2 ¤2.4 ¤1.2 ¤
Example1,000,0001.5 ¤3 ¤1.5 ¤
+20%1,200,0001.8 ¤3.6 ¤1.8 ¤

Assumptions & limits

This simplified comparison has two input billing categories. It excludes cache-write prices, storage, output and tool charges. If your provider bills writes separately, account for them in addition and do not classify written tokens as cache reads.

Displayed results are rounded. Calculations use unrounded JavaScript numbers; small floating-point differences are possible.

Works in your browser

The interactive tool runs in a sandbox with network access blocked. ClearByte and the advertising scripts cannot read values inside it. Browser extensions and a compromised device remain outside this protection.

Sources & definitions

Method checked:

Continue with a related task