
# Methodology

LowRouter estimates the carbon footprint of every inference request
using the formula and data sources described on this page. This is
the reference document; the numbers on the dashboard, the model
browser, and the API responses all come from it.

## What we report

Two numbers per request:

- **Energy** in watt-hours (Wh).
- **Carbon** in grams of CO₂ equivalent (gCO₂e).

The carbon number is also normalised to **gCO₂e per 1,000 tokens** so
requests of different sizes are comparable.

## The formula

```
energy_wh   = ((α × P_active) + β) × tokens × 1000
carbon_g    = energy_wh × grid_intensity_g_per_kwh / 1000
```

Where:

- **`P_active`** — number of active parameters during inference, in
  billions. For dense models this is the parameter count; for
  Mixture-of-Experts (MoE) models it's the parameters activated per
  token, not the total count.
- **`α`** = 8.91 × 10⁻⁵ kWh per output-token-billion-param.
- **`β`** = 1.43 × 10⁻³ kWh constant overhead per output token.
- **`tokens`** — total tokens for the request (`prompt_tokens +
  completion_tokens`).
- **`grid_intensity_g_per_kwh`** — annual-average carbon intensity of
  the electricity grid in the region serving the request.

The energy formula is the
[EcoLogits v0.4 inference model](https://ecologits.ai/0.4/methodology/llm_inference/).
The grid-intensity values come from the International Energy Agency.

## Why this formula

The EcoLogits model is published, peer-reviewed in spirit if not
fully formally, and reproducible from public model parameter counts.
It is not the only credible estimate but it is the one with the
clearest derivation and the most active maintenance. Adopting it lets
us compare numbers across providers using the same yardstick rather
than reconciling each provider's bespoke estimate.

## Confidence bands

Every estimate carries one of three labels:

| Band | When | Expected error |
|------|------|----------------|
| `accurate` | Model size verified by the provider or in the EcoLogits registry; recent grid data. | ±20% |
| `medium` | Model size from a credible third party (research paper, well-supported leak); grid data current. | ±40% |
| `gross` | Model size estimated from the model name or industry rumour; or grid data older than 12 months. | ±60% or more |

These bands are about *uncertainty in the inputs*, not about whether
the formula itself is right. The formula has its own model-class
limits documented on the [limits page](limits).

When the band is `gross`, the dashboard widgets that aggregate carbon
across many requests show a reduced-confidence indicator and link
back to this page.

## Methodology versioning

Every estimate stores the `methodology_version` that produced it
(see [per-request metadata](../models/per-request-metadata)). The
version captures:

- The values of α and β.
- The IEA grid-intensity dataset year.
- The model parameter-count dataset version.

When any of these change, the version is bumped and the change is
noted in the dashboard's footer with the date. Old generations are
*not* retroactively recomputed — their `methodology_version` is the
one in effect when the request was served.

## Worked example

A request:

- Resolved model: `openai/gpt-4o-mini`.
- Active parameters: 8B (this is the value we use; the provider has
  not officially confirmed it, so the band is `medium`).
- Total tokens: 200.
- Provider region: `eu-west`.
- Grid intensity: ~340 gCO₂e/kWh (IEA EU average).

Energy:

```
energy_wh = ((8.91e-5 × 8) + 1.43e-3) × 200 × 1000
          = (7.13e-4 + 1.43e-3) × 200 × 1000
          = 2.143e-3 × 200 × 1000
          = 0.4286 Wh
```

Wait — this needs careful unit handling. The EcoLogits formula's α
is per-token, β is per-token; we multiply by total tokens to get the
total energy in kWh, then convert.

Re-doing with explicit units:

```
energy_per_token_kwh = (8.91e-5 × 8) + 1.43e-3   = 0.002143 kWh/token
energy_kwh           = 0.002143 × 200            = 0.4286 kWh   <-- too high
```

The EcoLogits coefficients in the published v0.4 are in **watt-hours
per output token**, not kWh. The formula as we apply it is:

```
energy_wh_per_token  = (α × P_active) + β
                     = (8.91e-5 × 8) + 1.43e-3   = 0.002143 Wh/token
energy_wh            = 0.002143 × 200            = 0.43 Wh
energy_kwh           = 0.43 / 1000               = 4.3e-4 kWh
carbon_g             = 4.3e-4 × 340              = 0.146 g
carbon_per_1k_tokens = 0.146 × (1000 / 200)      = 0.73 g
```

So a 200-token completion on `gpt-4o-mini` from `eu-west` is
estimated at **0.43 Wh** and **~0.15 gCO₂e**, with `medium`
confidence. These are the numbers your `eco` block would carry.

If you find a discrepancy between this worked example and what the
gateway returns, the gateway is the source of truth — please file an
issue so we can fix the documentation.

## The full picture

Read the [data sources](data-sources) page next for where each number
in the formula comes from. The
[limits](limits) page lists what we explicitly do not claim.
