Track and reduce CO2 emissions from your computing

AI can benefit society in many ways but, given the energy needed to support the computing behind AI, these benefits can come at a high environmental price.

CodeCarbon is a lightweight software package that seamlessly integrates into your Python codebase. It estimates the amount of carbon dioxide (CO2) produced by the cloud or personal computing resources used to execute the code.

It then shows developers how they can lessen emissions by optimizing their code or by hosting their cloud infrastructure in geographical regions that use renewable energy sources

What it is

A lightweight and easy-to-use Python pip package

Emissions tracked based on your power consumption & location-dependent carbon intensity

Effective visualization of outputs in an integrated dashboard

Open-source, free, and driven by the community

An introduction to CodeCarbon
An introduction to CodeCarbon

Calling out: Read more on Medium

How it works

Embed in your code with just a few lines of code

Run your code and let CodeCarbon track your emission

Visualize the output in clear dashboards


Visualizing the outputs & insights

Emissions for individual code repositories based on infrastructure and power consumption.

Exemplary equivalents to put emissions in context.

Recommends compute regions with lower carbon intensity for major cloud providers – AWS, Azure, and GCP.

Call for action

Use CodeCarbon, Contribute to its development, and spread the word!

CodeCarbon was developed by four partner organizations and is made freely available to the community.

Here is the team that built CodeCarbon.
Join us and help improve CodeCarbon!

Sasha Luccioni
Postdoctoral researcher
AI for Humanity

Victor Schmidt
PhD Student

Tristan Mallet
Data Science

Kamal Goyal
Senior AI
Software Engineer

Aditiya Joshi
AI Software Engineer

Sorelle Friedler
Associate Professor,
Computer Science

Jonathan Wilson
Associate Professor,
Environmental Studies

Ziyao Wang
Haverford class of 2022

Nicolas Laskaris
Data Scientist

Boris Fled
Senior Software Engineer

Douglas Bank
Head of Research