ccusage-eco
v1.0.2
Published
Claude Code usage with estimated energy and water columns.
Maintainers
Readme
ccusage-eco
Your Claude Code usage table with two extra columns: estimated energy and water.
It runs ccusage and costs each row's tokens against a table of per-model energy rates.
┌────────────┬─────────────┬─────────┬───────────┬────────────┬─────────────┬─────────────┬─────────┬─────────────┬────────┬──────────┐
│ Date │ Model │ Input │ Output │ Cache │ Cache │ Total │ Cost │ Energy │ Water │ Fridge │
│ │ │ │ │ Create │ Read │ Tokens │ (USD) │ (Wh) │ (L) │ (hrs) │
├────────────┼─────────────┼─────────┼───────────┼────────────┼─────────────┼─────────────┼─────────┼─────────────┼────────┼──────────┤
│ 2026-09-16 │ - opus-5 │ 4,202 │ 3,130,104 │ 8,600,845 │ 251,729,332 │ 263,464,483 │ $263.17 │ 2,172.67 Wh │ 3.69 L │ 21.7 hrs │
│ │ - sonnet-5 │ │ │ │ │ │ │ │ │ │
├────────────┼─────────────┼─────────┼───────────┼────────────┼─────────────┼─────────────┼─────────┼─────────────┼────────┼──────────┤
│ 2026-09-17 │ - opus-5 │ 135,367 │ 2,316,932 │ 7,806,555 │ 235,457,855 │ 245,724,396 │ $204.63 │ 1,741.85 Wh │ 2.96 L │ 17.4 hrs │
│ │ gpt-5.4 * │ │ │ │ │ │ │ │ │ │
├────────────┼─────────────┼─────────┼───────────┼────────────┼─────────────┼─────────────┼─────────┼─────────────┼────────┼──────────┤
│ TOTAL │ │ 139,569 │ 5,447,036 │ 16,407,400 │ 487,187,187 │ 509,188,879 │ $467.80 │ 3,914.52 Wh │ 6.65 L │ 39.1 hrs │
└────────────┴─────────────┴─────────┴───────────┴────────────┴─────────────┴─────────────┴─────────┴─────────────┴────────┴──────────┘
Total: $467.80 · 3.91 kWh · 6.7 L water
* 2,101,455 tokens (0.4%) ran on non-Claude models. No published energy rate, so they
count towards tokens and cost only.
Rates: latest published table (2026-09-03). Cache reads charged at 10% of the input rate.Each column sizes itself to its widest value, so nothing is truncated. A row that used several models lists them one per line.
Install
Nothing to install. Run it with npx:
npx ccusage-ecoOr install it once for a shorter command:
npm install -g ccusage-eco
ccusage-ecoNeeds Node 18 or newer.
Usage
ccusage-eco # by day
ccusage-eco weekly # by week
ccusage-eco monthly # by month
ccusage-eco session # by session
ccusage-eco --since 20260301 # other flags go to ccusage
ccusage-eco --check-rates # compare shipped rates against upstream
ccusage-eco --help # usageThe first argument can be daily (the default), weekly, monthly or session.
--since, --until, --project and anything else ccusage takes are passed straight
through. Only the subcommand and --check-rates are read here.
Columns
| Column | Meaning |
| --- | --- |
| Model | Every model that ran in that period, one per line. A * marks one with no energy rate |
| Input / Output | Non-cached tokens in and out |
| Cache Create / Cache Read | Cache-creation and cache-read tokens |
| Total Tokens / Cost (USD) | Straight from ccusage |
| Energy (Wh) | Estimated, see below |
| Water (L) | Energy x 1.7 mL/Wh |
| Fridge (hrs) | Energy / 100, a running fridge averaging ~100W |
How energy is estimated
Per million tokens:
(input + cache create + cache read x 0.1) x input rate + output x output rateCache reads are charged at a tenth of the input rate because they skip the prefill. Each model is costed at its own rate, so a day that mixed Opus and Haiku is not flattened into one average.
These are rough figures from published research, not measurements of Anthropic's hardware. Compare one week against another with them. Do not audit anything with them.
Non-Claude models
ccusage reports every agent it finds, including Codex, Gemini and Copilot. The rate table
only covers Claude, so other models are listed with a * and left out of the energy
columns. Their tokens and dollars still count. A row with no Claude usage at all has
empty Energy, Water and Fridge cells.
Costing a Gemini call at Claude Sonnet's rate would produce a number, and that number would mean nothing.
Rates
The rates ship with the package, so a given version always produces the same output. Two tables are included, in Wh per million tokens as input / output:
| Family | 2026-03-16 | 2026-09-03 | | --- | --- | --- | | fable | | 90 / 447 | | opus | 50 / 250 | 45 / 223 | | sonnet | 30 / 150 | 27 / 134 | | haiku | 10 / 50 | 9 / 45 |
Every row is costed with the table in force on its date, so last month's numbers do not move when new rates arrive. Session rows have an id rather than a date, so they use the current table.
ccusage-eco --check-rates fetches the upstream skill, compares it to what shipped, and
prints what differs. That is the only command that reaches the network on its own
account, and it is meant for maintaining the package rather than daily use.
Credit
Energy rates come from environmental-impact-tracker by Zachary Rosen, MIT licensed.
Licence
MIT.
