> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mangrovesystems.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 3.4: Allocating Emissions to Batches

> Distribute shared emissions across batches using proportional, time-based, and direct allocation methods.

<Panel>
  <Card title="Accounting Academy" className="accounting-academy-card">
    <div className="accounting-academy-content">
      <Steps className="my-0">
        <Step title="MODULE 1: Fundamentals" icon="bookmark" iconType="solid" stepNumber={1} titleSize="p">
          * [1.1: Core Concepts & the Data Lifecycle](/accounting-academy/module-1/1-1-core-concepts-data-lifecycle)
          * [1.2: Translating Methodologies to Mangrove](/accounting-academy/module-1/1-2-translating-methodologies-to-mangrove)
          * [1.3: Events and Datapoints](/accounting-academy/module-1/1-3-events-and-datapoints)
          * [Exercise: Design and Build](/accounting-academy/module-1/1-exercise-design-and-build)
        </Step>

        <Step title="MODULE 2: Calculations" icon="bookmark" iconType="solid" stepNumber={2} titleSize="p">
          * [2.1: Calculation Architecture](/accounting-academy/module-2/2-1-calculation-architecture)
          * [2.2: Expanding Your Data Model](/accounting-academy/module-2/2-2-expanding-your-data-model)
          * [Exercise: Multi-Step Calculations](/accounting-academy/module-2/2-exercise-multi-step-calculations)
        </Step>

        <Step title="MODULE 3: Batch Partitioning & LCA" icon="bookmark" iconType="solid" stepNumber={3} titleSize="p">
          * [3.1: What Is a Batch?](/accounting-academy/module-3/3-1-what-is-a-batch)
          * [3.2: Batch Partitioning Strategies](/accounting-academy/module-3/3-2-batch-partitioning)
          * [3.3: Life Cycle Assessment & Emissions](/accounting-academy/module-3/3-3-lca-and-emissions)
          * [3.4: Allocating Emissions to Batches](/accounting-academy/module-3/3-4-allocating-emissions-to-batches)
          * [Exercise: Batch Partitioning & LCA](/accounting-academy/module-3/3-exercise-batch-partitioning-and-lca)
        </Step>

        <Step title="MODULE 4: Mass Balance with Ledgers" icon="bookmark" iconType="solid" stepNumber={4} titleSize="p">
          * [4.1: Introduction to Mass Balance](/accounting-academy/module-4/4-1-intro-to-mass-balance)
          * [4.2: Designing the Ledger Structure](/accounting-academy/module-4/4-2-designing-the-ledger-structure)
          * [4.3: Multiple Batch Types for Different Stages](/accounting-academy/module-4/4-3-multiple-batch-types)
          * [Exercise: Design & Build Mass Balance](/accounting-academy/module-4/4-exercise-design-and-build-mass-balance)
        </Step>

        <Step title="MODULE 5: Integration Testing" icon="bookmark" iconType="solid" stepNumber={5} titleSize="p">
          * [5.1: The Complete Model Assembly](/accounting-academy/module-5/5-1-the-complete-model-assembly)
          * [5.2: Testing Patterns](/accounting-academy/module-5/5-2-testing-patterns)
          * [5.3: Common Integration Pitfalls](/accounting-academy/module-5/5-3-common-integration-pitfalls)
          * [Exercise: Integration Testing](/accounting-academy/module-5/5-exercise-integration-testing)
        </Step>

        <Step title="MODULE 6: Advanced Patterns & Production" icon="bookmark" iconType="solid" stepNumber={6} titleSize="p">
          * [6.1: Model Design Best Practices](/accounting-academy/module-6/6-1-model-design-best-practices)
          * [6.2: Advanced Techniques](/accounting-academy/module-6/6-2-advanced-techniques)
          * [6.3: Production Readiness](/accounting-academy/module-6/6-3-production-readiness)
          * [Exercise: Production Deployment](/accounting-academy/module-6/6-exercise-production-deployment)
        </Step>
      </Steps>
    </div>
  </Card>
</Panel>

<Check>
  **What you'll learn in this lesson:**

  * Understand why emissions must be allocated to individual batches
  * Apply proportional allocation (by mass or carbon content)
  * Apply time-based allocation for periodic costs
  * Use direct allocation for batch-specific emissions
</Check>

In the previous lesson you learned how to calculate total process emissions. But those totals need to be **distributed across individual batches** — a monthly electricity bill must be shared among all the deliveries that month. This lesson covers the three main allocation methods.

## Why allocation is necessary

Batches are the reporting unit — each batch must carry its **fair share** of emissions so that its net carbon figure is accurate. Without allocation, you'd have:

* Some batches with zero emissions (overstated removal)
* Other batches bearing all emissions (understated removal)
* Reports that don't reflect the true per-batch impact

```mermaid theme={null}
flowchart TB
    MONTHLY["Monthly Electricity<br/>4.17 tCO2e"] --> ALLOC["Allocation<br/>(by mass)"]
    ALLOC --> B1["Batch 1<br/>3t → 1.25 tCO2e"]
    ALLOC --> B2["Batch 2<br/>5t → 2.09 tCO2e"]
    ALLOC --> B3["Batch 3<br/>2t → 0.83 tCO2e"]

    style MONTHLY fill:#ffa726,stroke:#f57c00,stroke-width:2px,color:#000
    style ALLOC fill:#66bb6a,stroke:#388e3c,stroke-width:2px,color:#000
    style B1 fill:#ef5350,stroke:#c62828,stroke-width:2px,color:#000
    style B2 fill:#ef5350,stroke:#c62828,stroke-width:2px,color:#000
    style B3 fill:#ef5350,stroke:#c62828,stroke-width:2px,color:#000
```

## Allocation methods

<Tabs>
  <Tab title="Proportional allocation">
    Distribute emissions based on a measurable attribute of each batch — typically **mass** or **carbon content**.

    **Formula:**
    `batch_emissions = total_emissions × (batch_attribute / sum_of_all_batch_attributes)`

    **Example — by mass:**
    Monthly electricity = 4.17 tCO2e. Three deliveries: 3t, 5t, 2t (total 10t).

    * Batch 1: 4.17 × (3/10) = **1.25 tCO2e**
    * Batch 2: 4.17 × (5/10) = **2.09 tCO2e**
    * Batch 3: 4.17 × (2/10) = **0.83 tCO2e**

    **Best for:** Shared resources consumed in proportion to production volume (electricity, facility overhead).
  </Tab>

  <Tab title="Time-based allocation">
    Distribute emissions evenly across batches within a time period, or weighted by the batch's duration within that period.

    **Formula:**
    `batch_emissions = period_emissions × (batch_days / period_days)`

    **Example — by days:**
    Monthly propane = 2.86 tCO2e (January, 31 days). Batch 1 covers Jan 1-10, Batch 2 covers Jan 11-31.

    * Batch 1: 2.86 × (10/31) = **0.92 tCO2e**
    * Batch 2: 2.86 × (21/31) = **1.94 tCO2e**

    **Best for:** Costs billed on a time basis (monthly utility bills, lease costs).
  </Tab>

  <Tab title="Direct allocation">
    Assign emissions directly to a specific batch when the emission source is uniquely tied to that batch.

    **Example — transport:**
    Delivery 2 required 200 km of transport. Transport emissions = 0.16 tCO2e.

    * Batch 2 receives **0.16 tCO2e** directly. Other batches receive 0.

    **Best for:** Emissions uniquely caused by a specific batch (transport to a specific delivery, batch-specific processing).
  </Tab>
</Tabs>

## Combining allocation methods

In practice, you'll use multiple methods for different emission sources within the same project:

| Emission Source     | Allocation Method                 | Rationale                                              |
| ------------------- | --------------------------------- | ------------------------------------------------------ |
| Monthly electricity | Proportional (by mass)            | Electricity consumption scales with production volume  |
| Monthly propane     | Proportional (by mass)            | Heating energy scales with throughput                  |
| Transport emissions | Direct (per-delivery)             | Each delivery has its own transport route and distance |
| Embodied emissions  | Time-based (monthly amortization) | Facility costs are constant regardless of production   |

<Note>
  The allocation method should reflect the **causal relationship** between the emission source and the batch. If an emission scales with mass, allocate by mass. If it's tied to a specific event, allocate directly.
</Note>

## Building allocation in the model

In the <a href="/production-accounting/models" target="_blank" rel="noopener noreferrer">Model Editor</a>, allocation logic is implemented using operators and node references:

<Steps>
  <Step title="Calculate total emissions per source">
    Sum all emission events for the accounting period (e.g., total kWh × grid factor).
  </Step>

  <Step title="Calculate the allocation weight">
    For proportional allocation: `batch_mass / total_mass_in_period`. This may use the `data_point_proportion` operator.
  </Step>

  <Step title="Apply the allocation">
    Multiply total emissions by the allocation weight to get the per-batch share.
  </Step>

  <Step title="Deduct from gross carbon">
    Use a `difference` node: `net_carbon = gross_carbon - allocated_emissions`.
  </Step>
</Steps>

<Tip>
  The `data_point_proportion` operator in the Model Editor can automatically calculate a batch's share of a total. This simplifies proportional allocation — you don't need to manually compute the denominator.
</Tip>

## Verifying allocation correctness

After building the allocation logic, verify that:

1. **Allocated emissions sum to the total** — all per-batch shares should add up to the total emissions for the period
2. **No batch has negative net carbon** — if a batch's emissions exceed its gross carbon, something is likely misconfigured
3. **Proportions are reasonable** — larger batches should receive proportionally larger emission shares

<Warning>
  A common error is double-counting: allocating the same emission source through both proportional and direct methods. Each emission source should be allocated through exactly one method.
</Warning>

***

### Check your understanding

<Accordion title="When would you use proportional allocation vs. direct allocation?" icon="circle-question">
  Use **proportional allocation** for shared resources that scale with production volume (electricity, facility overhead). Use **direct allocation** for emissions uniquely tied to a specific batch (transport for a specific delivery, batch-specific processing). The choice should reflect the **causal relationship** between the emission and the batch.
</Accordion>

<Accordion title="How do you verify that emissions are correctly allocated?" icon="circle-question">
  Check three things: (1) **Allocated emissions sum to the total** — all per-batch shares should equal the total period emissions. (2) **No batch has negative net carbon** — if emissions exceed gross carbon, the allocation is likely wrong. (3) **Proportions are reasonable** — larger batches should carry proportionally larger emission shares.
</Accordion>

***

You're now ready to put batch partitioning and LCA into practice in the [Module 3 Exercise: Configure Batch Partitioning with LCA Emissions](/accounting-academy/module-3/3-exercise-batch-partitioning-and-lca).
