Experimenting with Carbon Footprint Metadata in Beancount Ledgers

After four years of using Beancount to track every aspect of my finances - personal spending, rental properties, investments - I have started wondering about something beyond the numbers in my ledger: my environmental impact.

I have optimized my finances pretty well at this point. But as someone who values transparency and accountability in financial tracking, I started asking myself: should I apply that same rigor to my carbon footprint?

Why This Matters in 2026

I did some research and found some fascinating trends. Spend-based carbon tracking - where you estimate emissions based on what you spend - has shown that people can reduce their carbon footprint by about 10% just from increased awareness. Some banks in Sweden are even offering credit cards that calculate the carbon impact of every purchase.

But here is my issue with those tools: they are black boxes. You give them your transaction data, they run it through some algorithm, and spit out a number. As Beancount users, we have rejected that approach for our finances. Why accept it for our environmental tracking?

A Beancount Metadata Experiment

I have been experimenting (and I will admit, sometimes over-complicating things - classic me) with adding carbon metadata to transactions. Here is what I am testing:

2026-03-15 * "Whole Foods" "Groceries - mostly local produce"
  Assets:Checking                           -85.43 USD
  Expenses:Food:Groceries                    85.43 USD
    carbon-kg: 12.5
    carbon-source: "local-food"
    carbon-intensity: "low"

The concept: tag each transaction with an estimated carbon footprint (in kg CO2e). I am using rough category-based estimates:

  • Food: around 1.5 kg CO2e per $10 spent (highly variable by food type)
  • Transportation: around 0.4 kg CO2e per mile driven
  • Electronics: around 5 kg CO2e per $100 spent (manufacturing is carbon-intensive)
  • Local services: around 0.5 kg CO2e per $10 spent (generally lower impact)

These are approximations - I know that. But they are transparent approximations that I control. Over time, I can refine them as I learn more about the carbon intensity of different purchases.

Beancount Query Power

Once you have this metadata in your ledger, you can start asking interesting questions:

Which spending categories have the biggest carbon impact?

SELECT account, SUM(carbon_kg) AS total_carbon
WHERE carbon_kg != NULL
GROUP BY account
ORDER BY total_carbon DESC;

What is my carbon intensity per dollar?

SELECT account, SUM(carbon_kg) / SUM(amount) AS carbon_per_dollar
WHERE carbon_kg != NULL
GROUP BY account;

Am I improving over time?

SELECT YEAR(date), MONTH(date), SUM(carbon_kg) AS monthly_carbon
WHERE carbon_kg != NULL
GROUP BY YEAR(date), MONTH(date);

Imagine tracking both your net worth growth AND your carbon footprint reduction in the same system. That feels powerful to me.

The Hard Part: Getting Good Data

This is where I could really use the community help. Where do we get reliable carbon intensity data?

I have found a few sources:

  • EPA carbon footprint calculator (category-level averages)
  • Academic research on spend-based carbon accounting
  • Commercial APIs like Climatiq (subscription-based)

But manually tagging every transaction gets tedious fast. I am starting to think about building an importer plugin that auto-tags common merchants with estimated carbon data. Your local coffee shop? Low carbon. International flight? High carbon. Amazon purchase? Depends on what you bought.

Questions for the Community

I would really value input from folks here:

  1. Has anyone tried this? I cannot be the only person thinking about environmental tracking in plain text accounting.

  2. What data sources make sense? Should we collaboratively build a merchant carbon database? That feels very “Beancount community” to me.

  3. Am I overthinking this? I have a tendency to over-engineer, and my wife regularly reminds me of this. Is carbon tracking in Beancount genuinely useful, or just another thing to obsess over?

  4. How do we handle uncertainty? Financial data is precise. Carbon estimates are fuzzy. Should we track ranges? Confidence intervals?

  5. Does awareness lead to change? If I see my restaurant spending generates 50kg CO2e per month, will I actually change my behavior? Or am I just tracking guilt?

Why This Matters

The corporate world is moving toward mandatory carbon disclosure - CSRD in Europe, TCFD reporting globally. Big companies are being held accountable for their emissions.

As individuals who already track our finances obsessively, we have the tools and discipline to do this for our environmental impact too. Not because we have to, but because we believe in measuring what matters.

When I migrated from GnuCash to Beancount four years ago, someone told me: “You cannot optimize what you do not measure.” That changed how I think about money. Maybe it applies to carbon too.

I would love to hear your thoughts. Is this worth pursuing? Or should I focus on more practical Beancount improvements?

This is really timely. I have had three clients ask me about ESG reporting and carbon accounting in the last six months - something that was virtually unheard of in my small business practice just two years ago.

From a professional accounting perspective, here is what I am seeing in 2026:

The Corporate Trend is Trickling Down

The regulatory pressure on large companies (CSRD in Europe, TCFD globally, SEC climate disclosure rules in the US) is creating a cascade effect. Mid-market companies are asking about carbon accounting because their enterprise customers require it for supply chain emissions (Scope 3). Small businesses are asking because they want to compete for those contracts.

What started as a Fortune 500 compliance exercise is becoming a competitive differentiator for businesses of all sizes.

The Data Quality Challenge

Here is my concern with applying this to personal finance: corporate carbon accounting already struggles with data quality, and they have dedicated teams and six-figure software budgets. The carbon intensity estimates you are using (1.5 kg CO2e per $10 food spending) are category-level approximations that hide enormous variation.

For example:

  • $10 of local vegetables: ~2-3 kg CO2e
  • $10 of beef: ~15-20 kg CO2e
  • $10 of imported fruit: ~5-8 kg CO2e

Using a single average might give you directional insight, but I would caution against treating these numbers with the same confidence we treat financial data. In professional practice, we would flag this level of estimation as requiring significant assumptions and disclaimers.

Where Beancount Transparency Helps

That said, I actually think Beancount is well-suited for this kind of experimentation precisely because of its transparency. In commercial carbon accounting software, the methodology is often opaque. You cannot inspect the calculations or adjust assumptions based on better information.

With Beancount metadata, you are explicitly documenting your assumptions. Future you (or future researchers) can review your carbon-kg tags, understand they were based on 2026 EPA category averages, and adjust them as better data emerges. That is good scientific practice, even if the initial data is rough.

Professional Advice

If you pursue this, I would recommend:

  1. Document your methodology somewhere in your ledger (maybe in a README or a special metadata field on periodic entries) so you remember what assumptions you made

  2. Consider tagging confidence levels alongside carbon estimates. High confidence for things like electricity bills (you can calculate exact grid carbon intensity). Low confidence for generic spending categories.

  3. Focus on relative comparisons over time rather than absolute numbers. Track whether your carbon footprint is trending up or down, not whether it is exactly 8.3 tons or 8.7 tons per year.

  4. Be prepared for maintenance burden. Carbon intensity data changes as grids get cleaner, supply chains evolve, and methodologies improve. Financial data is stable - a dollar is a dollar. Carbon data will require periodic recalibration.

The Bigger Question

My real question is whether this level of tracking actually drives behavior change. In my experience with financial tracking, awareness alone is powerful - clients who track expenses spend more intentionally. But carbon is less intuitive than money. Will seeing 50 kg CO2e from restaurant spending change behavior the same way seeing $200 does?

I honestly do not know. But I appreciate that you are trying to apply the same rigor to environmental impact that we apply to financial impact. That feels consistent with the Beancount philosophy of measuring what matters.

Just remember: these carbon numbers are estimates, not facts. Treat them as directional indicators, not precise measurements.

This is exactly the kind of professional perspective I was hoping for! You are absolutely right about the data quality issues - I have been wrestling with this.

The Confidence Level Idea is Brilliant

Your suggestion to tag confidence levels alongside carbon estimates is something I had not considered, but it makes perfect sense. Something like:

2026-03-20 * "PG&E" "Electricity bill"
  Assets:Checking                           -120.00 USD
  Expenses:Utilities:Electricity            120.00 USD
    carbon-kg: 45.2
    carbon-confidence: "high"
    carbon-source: "grid-intensity-data"
    
2026-03-20 * "Amazon" "Various purchases"
  Liabilities:CreditCard                    -85.00 USD
  Expenses:Shopping:Online                   85.00 USD
    carbon-kg: 25.0
    carbon-confidence: "low"
    carbon-source: "category-estimate"

This way, when I query my total carbon footprint, I can weight by confidence or filter to only high-confidence estimates to understand the floor of my impact.

Relative vs Absolute Tracking

You make a great point about focusing on trends rather than absolute numbers. This is actually similar to how I think about my FIRE progress - I care more about my savings rate trend than whether my net worth calculation is exact to the dollar (especially with illiquid assets like my car or furniture).

If I can see that my carbon footprint decreased from ~1500 kg/month to ~1200 kg/month over a year, that is meaningful even if both numbers are rough estimates.

The Behavior Change Question

Your question about whether carbon tracking drives behavior change hits home. For me, financial tracking definitely changed behavior - seeing my restaurant spending at $600/month in 2021 was a wake-up call that led to real changes.

But you are right that carbon is less intuitive. When I see “$50 for dinner”, I know exactly what that means for my budget. When I see “15 kg CO2e”, I honestly have no visceral sense of whether that is a lot or a little.

Maybe this requires building intuition over time? After tracking for a few months, I might develop a mental model where:

  • My daily commute: ~5 kg CO2e
  • A flight to NYC: ~500 kg CO2e
  • Monthly electricity: ~100 kg CO2e
  • Grocery trip: ~15 kg CO2e

Once I have those reference points, the numbers might become more meaningful for decision-making.

Maintenance Burden

The maintenance concern is real. I already spend time updating my importers when banks change CSV formats. Adding carbon intensity recalibration on top of that could be a lot.

Maybe the solution is to version carbon intensity assumptions? Like:

; Carbon intensity assumptions v1.0 (2026-03-01)
; Food: 1.5 kg/$10 (EPA 2025 category average)
; Transport: 0.4 kg/mile (ICE vehicle)
; Electricity: 0.377 kg/kWh (California grid 2025)

Then when I recalibrate six months later, I can document that change and potentially reprocess historical data, or just accept that older data used older assumptions (similar to how we handle historical cost basis adjustments).

Am I Really Going to Do This?

Honestly, after your reality check on data quality and maintenance burden, I am asking myself whether this is worth it. Part of me thinks: “The corporate world has resources and regulatory requirements pushing them to do carbon accounting. As an individual, should I spend this effort on tracking, or just on reducing?”

But another part of me thinks: if the only people who track carbon are those legally required to, we will never develop better methodologies. Maybe early adopters experimenting with personal carbon tracking (however imperfect) helps build the data and tools that make this easier for everyone later.

What do you think? Should individuals even attempt carbon accounting, or should we focus on simpler proxies (like total spending, since spending correlates with carbon)?