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

# Calculators

> Real-time impact calculations for CO2 equivalents, MKI scores, and custom sustainability metrics.

The Calculation Hub is the core engine that processes raw data into standardized sustainability scores. It supports real-time calculations for individual products, orders, and entire shopping carts.

## How it works

1. You provide product data with material composition, weight, and transport parameters
2. The engine applies LCA (Life Cycle Assessment) methodology
3. Results are returned as standardized impact scores

## Calculation types

| Type                | Description                                       | Use case                     |
| ------------------- | ------------------------------------------------- | ---------------------------- |
| **CO2 Equivalent**  | Total greenhouse gas emissions in kg CO2e         | Product pages, cart totals   |
| **MKI Score**       | Milieukostenindicator (environmental cost) in EUR | Construction, infra projects |
| **Water Footprint** | Water consumption in liters                       | Food, agriculture            |
| **Energy Use**      | Total energy in kWh                               | Manufacturing, electronics   |
| **Custom Metric**   | User-defined calculations                         | Sector-specific needs        |

## Basic calculation

```graphql theme={null}
mutation {
  calculateImpact(input: {
    productId: "prod_abc123"
    quantity: 50
  }) {
    co2Equivalent
    mkiScore
    waterFootprint
    energyUse
    breakdown {
      phase
      contribution
      percentage
    }
  }
}
```

The `breakdown` field provides a phase-by-phase analysis showing where in the lifecycle the impact occurs:

```json theme={null}
{
  "data": {
    "calculateImpact": {
      "co2Equivalent": 620.0,
      "mkiScore": 43.5,
      "waterFootprint": 15000,
      "energyUse": 890,
      "breakdown": [
        { "phase": "RAW_MATERIALS", "contribution": 310.0, "percentage": 50 },
        { "phase": "MANUFACTURING", "contribution": 155.0, "percentage": 25 },
        { "phase": "TRANSPORT", "contribution": 93.0, "percentage": 15 },
        { "phase": "USE_PHASE", "contribution": 31.0, "percentage": 5 },
        { "phase": "END_OF_LIFE", "contribution": 31.0, "percentage": 5 }
      ]
    }
  }
}
```

## Calculation with transport

Include transport parameters for accurate Scope 3 calculations:

```graphql theme={null}
mutation {
  calculateImpact(input: {
    productId: "prod_abc123"
    quantity: 100
    transportMethod: TRUCK
    distance: 500
    distanceUnit: KM
    originCountry: "NL"
    destinationCountry: "DE"
  }) {
    co2Equivalent
    transportContribution
    equivalency {
      description
      value
    }
  }
}
```

## Shopping cart calculation

Calculate the total impact of a shopping cart in real-time:

```graphql theme={null}
mutation {
  calculateCartImpact(input: {
    items: [
      { productId: "prod_abc123", quantity: 2 },
      { productId: "prod_def456", quantity: 1 },
      { productId: "prod_ghi789", quantity: 5 }
    ]
    shippingMethod: STANDARD
    shippingAddress: { country: "NL", postalCode: "1012AB" }
  }) {
    totalCo2Equivalent
    totalMkiScore
    perItem {
      productId
      co2Equivalent
    }
    shippingImpact
    equivalency {
      description
      value
    }
  }
}
```

## Supported lifecycle phases

| Phase           | Description                                |
| --------------- | ------------------------------------------ |
| `RAW_MATERIALS` | Extraction and processing of raw materials |
| `MANUFACTURING` | Production and assembly                    |
| `TRANSPORT`     | All logistics from origin to destination   |
| `USE_PHASE`     | Impact during product use                  |
| `END_OF_LIFE`   | Disposal, recycling, or reuse              |

<Card title="Scenario Simulator" icon="flask" href="/core-concepts/scenario-simulator">
  Run what-if analyses on your calculations by changing materials, transport, or energy sources.
</Card>
