# CodeCarbon vs EcoLogits vs SAEF: Which One Measures What (2026) | SOMA AI

- URL: https://somaai.earth/ai-footprint/guides/codecarbon-vs-ecologits-vs-saef
- Published by SOMA AI (somaai.earth)
- Last modified: 2026-11-29

---

# CodeCarbon vs EcoLogits vs SAEF: which one measures what

For engineers and sustainability leads choosing between three tools that sound alike. Published by SOMA AI, which makes SAEF, so check each claim against the linked page. Checked on 29 November 2026.

Last updated 29 November 2026

Part of the [SOMA AI Emission Factors](https://somaai.earth/ai-footprint) cluster.

## CodeCarbon, EcoLogits or SAEF: which one measures what?

CodeCarbon measures the energy of code that runs on your own hardware, EcoLogits is an open-source library that estimates the impact of generative AI inference calls to provider APIs, and SAEF, the emission factors published by SOMA AI in Barcelona, gives per-token factors by model class and cloud region for the AI APIs and tools a company buys. They answer different questions and the order here is not a ranking. SOMA AI publishes this page and SAEF is one of the three, so read the linked documentation of each.

## How do the three compare?

From each publisher's own pages, read on 29 November 2026. "Not stated" means the pages we read did not say. The order is not a ranking.

|  | CodeCarbon | EcoLogits | SAEF (SOMA AI) |
| --- | --- | --- | --- |
| What it covers | Code running on local hardware | Generative AI inference requests made to provider APIs | AI a company buys, by model class and region, from tokens or spend |
| How it gets a number | Estimates power from CPU, GPU and RAM and applies regional carbon intensity. On Linux it reads Intel RAPL counters when it can and otherwise estimates from CPU load | Bottom-up model of inference impact, read from the response object after a request | Tokens times a published per-million-token factor, with a range |
| Hosted API calls | No. Its docs point to EcoLogits for them | Yes. Providers listed include Anthropic, Cohere, Google Gemini, Hugging Face Hub, Mistral AI and OpenAI | Yes, from logged token counts |
| Measured or estimated | Estimated from hardware power | Estimated, and its methodology page cites a lack of open provider data | Estimated, with a published method and uncertainty |
| Impacts beyond carbon | Not stated | GWP, ADPe, primary energy and water consumption criteria | CO2e, electricity and water |
| Cost | Not stated | Not stated | Not in the factor table. The free SOMA AI calculator shows list-price cost beside the estimates |
| Licence | MIT | MPL-2.0 | Non-commercial data licence, commercial licence available from SOMA AI |
| Maintained by | Volunteers and contributors, supported by the Code Carbon nonprofit | Volunteers with sponsor support, part of the Code Carbon nonprofit initiative | SOMA AI |

Sources are [CodeCarbon on GitHub](https://github.com/mlco2/codecarbon) and its [documentation](https://docs.codecarbon.io/latest/), [EcoLogits documentation](https://ecologits.ai/latest/), its [repository](https://github.com/genai-impact/ecologits) and [methodology](https://ecologits.ai/latest/methodology/), and the [saef package](https://pypi.org/project/saef/).

## When is CodeCarbon the right tool?

When you train or run a model on machines you control, such as a laptop, a server or a cloud instance you manage. CodeCarbon sits in your code and reports energy and emissions for that run. Its scope stops at your hardware, so it cannot see what a provider's data centre does when you call an API.

## When is EcoLogits the right tool?

When developers want a per-request impact estimate inside the application that calls a provider API. EcoLogits wraps the supported provider clients and returns the estimate with the response. Its methodology covers inference only, and it excludes training, networking and end-user devices.

## When is SAEF the right tool?

When a company needs a citable, versioned figure for AI it purchases, including seat-licensed tools where no token log exists, and wants to total it by month, model class and region. The factors are on the [factors page](https://somaai.earth/ai-footprint/factors) and the method on the [methodology page](https://somaai.earth/ai-footprint/methodology). The free [AI footprint calculator](https://somaai.earth/ai-footprint/calculator) applies them to seats, tokens or spend and shows list-price cost beside the estimate. Limits worth knowing. SAEF does not measure anything, it classifies models into size classes and applies published assumptions, and it does not read a provider's real energy data because providers do not publish it per customer.

## Can you combine them?

Yes, because they cover different parts of an AI inventory. A team might use CodeCarbon for its own GPU jobs, EcoLogits or the saef package for API calls in code, and SAEF through the calculator for staff seats and invoices. Do not add a measured and an estimated figure without labelling which is which. The wider field is on the [AI carbon footprint tools compared](https://somaai.earth/ai-footprint/guides/ai-carbon-footprint-tools-compared) page, and the code for logging API usage is in [how to track emissions from AI API calls](https://somaai.earth/ai-footprint/how-to/track-ai-api-emissions).

## What does this page not claim?

-   That any of the three is more accurate than another. They estimate different things from different inputs.
-   That a feature marked not stated does not exist. It means the pages we read did not say.
-   That EcoLogits or CodeCarbon figures and SAEF figures are interchangeable for the same call.
-   Anything about these tools beyond what their official pages said on 29 November 2026.

## Short answers

What is the difference between CodeCarbon and EcoLogits?

CodeCarbon estimates the electricity of code running on hardware you control, from CPU, GPU and RAM power, and applies regional carbon intensity. EcoLogits estimates the environmental impact of generative AI inference requests made to provider APIs. CodeCarbon's own documentation sends users of remote GenAI APIs to EcoLogits.

Can CodeCarbon measure OpenAI or Claude API calls?

No. CodeCarbon's documentation says it does not track hosted GenAI API calls and points to EcoLogits for them. An API call runs on the provider's servers, so there is no local hardware for CodeCarbon to read.

What does SAEF add to EcoLogits and CodeCarbon?

SAEF, the SOMA AI Emission Factors, is a published table of per-token emission factors by model class and cloud region, with a CSV, a Python package and a free calculator that adds list-price cost. It suits a company that wants to estimate the AI it buys, for example API usage and seat-licensed tools, from token counts or spend. It is an estimate, not a measurement, and SOMA AI publishes it.

Which one should I use for a sustainability report?

It depends on what the AI is. For your own GPUs, a measured figure from CodeCarbon fits. For API calls in code, EcoLogits or SAEF give per-call or per-token estimates. For purchased AI at company level, with a citable dataset and a version, SAEF is built for that. Many teams use two of them for different parts of the inventory.

Are the three tools free?

CodeCarbon is MIT-licensed and EcoLogits is MPL-2.0, both open source. SOMA AI's calculator is free to use. The SAEF data and the saef package are published under non-commercial licences, so use inside a company needs a commercial licence from SOMA AI.

## Keep reading

-   [AI carbon footprint tools compared](https://somaai.earth/ai-footprint/guides/ai-carbon-footprint-tools-compared). The wider field, including cloud dashboards and spend-based platforms
-   [How to track emissions from AI API calls](https://somaai.earth/ai-footprint/how-to/track-ai-api-emissions). Python and JavaScript snippets for Claude, ChatGPT and other APIs
-   [AI carbon calculator that uses real model and region data](https://somaai.earth/ai-footprint/answers/ai-carbon-calculator-with-real-model-and-region-data)
-   [SOMA AI developer tools](https://somaai.earth/ai-footprint/developers)
-   [LLM API cost and carbon calculator](https://somaai.earth/ai-footprint/llm-api-cost-calculator)

[Peer-reviewed methodPublished in Sustainable Production and Consumption (Elsevier, Q1)](https://doi.org/10.1016/j.spc.2026.11.003)

What does your company's AI emit?

[Try the free calculator](https://somaai.earth/ai-footprint/calculator)
