Every website visit makes a little carbon. CarbonTrace works out how much.
It works this out for opening a web page, for one program asking another for data (an API call) and for asking an AI a question. Then it puts the answer in terms you can picture, like cups of tea.
8,800 visits to this page make as much carbon as one cup of tea.
This page: 16,949 bytes. Each visit: 0.0057 g of CO2e.
Bytes measure how big a file is. CO2e counts carbon dioxide and the other gases that warm the planet, all as if they were carbon dioxide. I count this page at its full size. On the way to you it gets squeezed, a bit like a zip file, so fewer bytes travel. Counting the full size means the page never makes its own number look smaller than it is.
What it counts
Page loads
Every time someone opens a web page. Bigger pages take more energy to send and to show.
How it's worked out
The bytes a page transfers, at 0.81 kWh per gigabyte and 442 g of CO2e per kWh. That energy covers data centres, networks, the visitor's device and the making of all that hardware.
API calls
When one program asks another for data. The longer the request runs, the longer a server works on it.
How it's worked out
How long the request runs, charged as a 50 W slice of a server for that time.
AI prompts
Questions and instructions sent to an AI. The more words it reads and writes, the longer its chips run.
How it's worked out
2 Wh per thousand tokens, plus a 300 W GPU held for as long as the prompt takes.
Tea, miles and trees
A gram of CO2e is hard to picture, so CarbonTrace also gives every total as something everyday.
- 8,800 visits to this page make as much as a cup of tea (50 g)
- 71,000 visits to this page make as much as a mile in an average passenger car (400 g, the US EPA's figure, rounded up)
- 1.8 million visits to this page make as much as one tree takes in over a year (10 kg)
The tea and tree figures are my own estimates. I set the tree figure low on purpose, so it won't overstate what planting a tree does.
Where the numbers come from
Page loads use the Sustainable Web Design model, version 3. That's the older version, and its grid figure of 442 g per kWh is below today's, so these numbers lean low.
I've written down every constant in the code with its source and a quoted passage. Once a month an automated audit fetches those sources again and flags any number that no longer matches.
Adding it to a site
For developers: on a website it's a small script that reports each page's size to your own CarbonTrace server.
<script src="/carbon-trace.min.js"></script>
<script>
CarbonTrace.init({
apiBaseUrl: 'https://your-carbontrace-server.example',
apiKey: 'your-project-api-key'
});
</script>
Where it stands
CarbonTrace is early and isn't public yet.
Works now
- Estimates for web pages, API calls and AI prompts
- Runs on your own server
- A monthly check of every number against where it came from
Not yet
- A version you can sign up for and use straight away
- Saving data: restarting the server wipes it for now
- A ready-made script for websites: for now you build it yourself
- Figures for how clean each country's electricity is: that part is still simulated
A demo that runs in your browser is coming next. To hear when CarbonTrace opens up, join the waitlist.
Hear when it opens
Leave your email and I'll write once, when CarbonTrace opens up. I won't use it for anything else. I delete it after 12 months. The privacy page says what I keep and how to come off the list.