<a id="cloud-cost-allocation"></a>

# Cost Allocation in Confluent Cloud

Cost allocation itemizes a Confluent Cloud bill by the service account, user,
identity pool, or resource that drove each charge. Use it to feed your internal
chargeback or showback process, split a shared cluster across the teams that use
it, reconcile Confluent Cloud usage to internal cost centers, and give engineering
leaders visibility into what their workloads cost.

#### NOTE
Cost allocation is an Early Access feature in Confluent Cloud.











An Early Access feature is a component of Confluent Cloud introduced to gain
feedback. This feature should be used only for evaluation and non-production
testing purposes or to provide feedback to Confluent, particularly as it
becomes more widely available in follow-on preview editions.

Early Access Program features are intended for evaluation use in development
and testing environments only, and not for production use. Early Access Program
features are provided: (a) without support; (b) “AS IS”; and (c) without
indemnification, warranty, or condition of any kind. No service level commitment
will apply to Early Access Program features. Early Access Program features are
considered to be a Proof of Concept as defined in the Confluent Cloud Terms of Service.
Confluent may discontinue providing preview releases of the Early Access
Program features at any time in Confluent’s sole discretion.

To request access, contact your
[Confluent account team](https://confluent.io/contact).

The native cost allocation export is a Confluent-managed pipeline. It does
not replace or deprecate
[chitragupta](https://github.com/waliaabhishek/chitragupta), an open-source
Python chargeback helper. You can keep using chitragupta. For a comparison, see
[Native export versus chitragupta](#cost-allocation-choosing).

<a id="cost-allocation-how-it-works"></a>

## How cost allocation works

A *principal* is an authenticated identity, such as a service account, user,
or identity pool, that performs actions in Confluent Cloud. For every billable metric
on your account, cost allocation splits the cost across the principals that
contributed to it. Cost allocation attributes usage to the principal that
generated it.

Usage-driven costs, such as Apache Kafka® network read/write, Connect tasks,
Confluent Units for Flink (CFUs), and Confluent Streaming Units (CSUs), are
split in proportion to each principal’s measured usage.

Shared or fixed costs, such as Confluent Units for Kafka (CKUs), partitions,
storage, Schema Registry base, and Confluent Support, are allocated using a weighted
average. The weight depends on the metric, such as read/write throughput, equal
split across active principals, or owner-of-record.

Costs that cannot be attributed to a principal, such as promotional credits,
refunds, and product lines that do not yet emit per-principal usage, appear in a
single `unallocated` row per bucket. For details, see
[The unallocated row](#cost-allocation-unallocated).

Within a bucket, the sum of `chargeback_cost` across every row equals the
total billable usage for that bucket. The split does not create or lose any
usage cost.

## Considerations

- Cost allocation attributes cost to the lowest entity that the source usage
  data can resolve. For most usage, that is a service account, user, or identity
  pool. For some metrics, such as Cluster Linking, Custom Connect, Stream Governance, and
  Flink SQL at the pool level, the entity is a resource ID, and `owner_id`
  is set to that resource ID rather than a principal.
- All time buckets align to UTC. Weekly buckets start on Monday by ISO week, and
  monthly buckets start on the first of the calendar month. Reconcile against
  the UTC invoice period, not your local calendar.
- The bucket total reconciles to usage charges for the period. Tax, marketplace
  pass-through, and prior-period adjustments are billed separately and are not
  included in the export.
- Per-topic and user-defined-tag attribution are not supported.
- Identity pool usage rolls up to the pool. Per-member attribution is not
  available.
- Data can lag actual usage by up to 48 hours. For monthly reconciliation, run
  the export at least 48 hours after the period ends so the period’s usage data
  is complete.
- Cost allocation has no service level agreement (SLA) during Early Access.
- Historical data is available only from the date you enabled cost allocation
  for your organization. An export cannot include usage from before that date,
  even if you request an earlier period.

<a id="cost-allocation-request-export"></a>

## Request a cost allocation export

Export your cost allocation data as a CSV file from the Confluent Cloud Console.
Export creation has no public API.

### Prerequisites

- An organization with Cost Allocation Early Access. Contact your
  [Confluent account team](https://confluent.io/contact) to request access.
- A user account with the **OrganizationAdmin** or **BillingAdmin** role in the
  target organization. For role details, see [Predefined RBAC Roles in Confluent Cloud](../security/access-control/rbac/predefined-rbac-roles.md#cloud-rbac-roles).

### Request allocation

1. Sign in to [Confluent Cloud](https://confluent.cloud) and open
   **Billing and payment**.
2. Select the **Cost allocation data** tab.
3. In the **Request download** pane, provide the request details:
   - **Name of the report**: An identifier for this export. For example, April
     Finance Close.
   - **Description**: Optional context for your team, up to 100 characters.
   - **Period**: Last 7 Days, Last 30 Days, or Custom Date Range with date
     picker for start and end.
   - **Granularity**: Daily, Weekly, or Monthly.
4. Click **Submit**. The request appears in the **Previous cost allocation
   downloads** table with a status of **Incomplete**.
5. When the status changes to **Ready**, click **Download** in the **Action**
   column to retrieve the CSV file.

<a id="cost-allocation-statuses"></a>

### Export request statuses

| Status         | Meaning                                                                                                                                                                           |
|----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **Incomplete** | The export is being generated, or usage data for the period is still<br/>arriving.                                                                                                |
| **Ready**      | The file is ready to download.                                                                                                                                                    |
| **Failed**     | The export could not be generated. Retry the export. If the problem<br/>persists, contact<br/>[Confluent Support](https://support.confluent.io) and include the<br/>request name. |
| **Expired**    | The export exceeded the seven-day retention window and is no longer<br/>available. Submit a new export request for the same period.                                               |

Most exports complete within minutes. Filter the table by month and year to
find past requests.

<a id="cost-allocation-export-file"></a>

## Cost allocation export format

Each row in the export represents the cost attributed to one entity for
one billable metric on one resource in one time bucket. The file is a CSV
file with the following columns:

| Column            | Description                                                                                                                                                                                                                                                                                               |
|-------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `timestamp`       | Bucket start in UTC, in ISO 8601 format: `YYYY-MM-DDTHH:mm:ssZ`                                                                                                                                                                                                                                           |
| `owner_id`        | The entity that incurred the cost:<br/><br/>- Service account: `sa-*`<br/>- User: `u-*`<br/>- Identity pool: `pool-*`<br/>- Resource:<br/>  - Cluster: `lkc-*`<br/>  - Connect cluster: `lcc-*`<br/>  - Custom Connect cluster: `clcc-*`<br/>  - Environment: `env-*`<br/>- Literal string: `unallocated` |
| `environment_id`  | Confluent Cloud environment ID. Empty for organization-level rows, such as<br/>Support.                                                                                                                                                                                                                   |
| `resource_id`     | Logical resource ID:<br/><br/>- Cluster: `lkc-*`<br/>- Connect cluster: `lcc-*`<br/>- Custom Connect cluster: `clcc-*`<br/>- Flink SQL compute pool: `lfcp-*`<br/>- ksqlDB cluster: `lksqlc-*`<br/><br/>Empty for organization-level rows.                                                                |
| `product_type`    | Product category as a lowercase string:<br/><br/>- `kafka`<br/>- `connect`<br/>- `custom-connect`<br/>- `flink`<br/>- `ksql`<br/>- `cluster-link`<br/>- `stream-governance`<br/>- `event-log`<br/>- `support-cloud-developer`<br/>- `unallocated`                                                         |
| `billing_metric`  | Specific billable metric in CamelCase:<br/><br/>- `KafkaNetworkRead`<br/>- `KafkaNumCKUs`<br/>- `KafkaStorage`<br/>- `ConnectNumTasks`<br/>- `FlinkNumCFUs`<br/>- `KSQLNumCSUs`<br/>- `ClusterLinkingPerLink`<br/>- `EventLogRead`<br/>- `Support`                                                        |
| `unit`            | Unit of measure for the metric:<br/><br/>- `GB`<br/>- `GB-hour`<br/>- `CKU-hour`<br/>- `CFU-hour`<br/>- `CSU-hour`<br/>- `Task-hour`<br/>- `Link-hour`<br/>- `Hour`<br/><br/>Empty for Confluent Support. `USD` for the `unallocated` row.                                                                |
| `chargeback_cost` | Cost attributed to this entity for this bucket, in USD.                                                                                                                                                                                                                                                   |
| `original_amount` | Total billed amount for this metric and resource before the split, in<br/>USD.                                                                                                                                                                                                                            |
| `usage_share`     | This entity’s share of usage, calculated as<br/>`chargeback_cost / original_amount`. Set to `0` for the<br/>`unallocated` row by design.                                                                                                                                                                  |

The export excludes rows with a zero billable amount.

Generated files are retained for seven days. After that, the file is removed and
the request shows a status of **Expired**. To get the data again, submit a new
export request for the same period.

Custom date ranges produce partial boundary buckets. A partial bucket contains
only the days inside the requested range. The `timestamp` field still points
to the bucket start. When summing across buckets, treat partial buckets
accordingly.

The export does not include human-readable names, such as cluster display name,
environment name, service-account name, or cost center. Map IDs to names using
your existing service-account inventory or the
[Confluent Cloud Identity APIs](https://docs.confluent.io/cloud/current/api.html#tag/Service-Accounts-(iamv2)).

<a id="cost-allocation-unallocated"></a>

### The unallocated row

An `unallocated` row captures cost that Confluent Cloud cannot attribute to a
specific entity at export time. Every export contains a single `unallocated`
row per time bucket. This cost includes:

- Promotional credits and refunds, which are applied at the organization level
  and reduce the total bill. They appear as a negative `chargeback_cost` on
  the `unallocated` row. For example, a $562.29 promotional credit applied in
  April appears as `chargeback_cost = -562.29` in the April monthly bucket.
- Product lines without per-principal usage. Some products, such as
  Tableflow, do not emit usage tagged with a principal. Their full cost
  appears in the `unallocated` row.
- Adjustments and credit notes issued for prior periods.

For the `unallocated` row, `chargeback_cost` equals `original_amount`
because the row is not split. The `usage_share` is set to `0` by design. The
`unit` is `USD`. When you reconcile the export to your invoice, the sum of
all `chargeback_cost` values, including the `unallocated` row and its
negative values, equals the total billable usage for the period.

You control how you internally distribute the `unallocated` total. Common
patterns include charging it to a shared organization-level cost center or
pro-rating it across business units in proportion to their total chargeback
cost.

<a id="cost-allocation-per-product"></a>

## Cost allocation by product

The following table shows how each product type’s costs are split and
which entity appears in the `owner_id` column.

| Product or metric                             | Allocation method                                                                                | `owner_id`                                             |
|-----------------------------------------------|--------------------------------------------------------------------------------------------------|--------------------------------------------------------|
| Kafka network read or write                   | Split across service accounts in proportion to read or write<br/>throughput.                     | `sa-*` or `u-*`                                        |
| Kafka CKUs                                    | Split using a weighted ratio of<br/>`(3 x read bytes) + (write bytes)` per principal.            | `sa-*` or `u-*`                                        |
| Kafka storage, partitions, base               | Split equally across active principals on the cluster in the<br/>bucket.                         | `sa-*` or `u-*`                                        |
| Connect capacity, tasks, and throughput       | Attributed to the Kafka cluster.                                                                 | `lkc-*`                                                |
| Custom Connect tasks and throughput           | Attributed to the Custom Connect cluster.                                                        | `clcc-*`                                               |
| Cluster Linking per link, read, and write     | Attributed to the source logical cluster.                                                        | `lkc-*`                                                |
| Flink SQL (CFU)                               | Attributed to the environment or compute pool.                                                   | `env-*`                                                |
| Schema Registry, Stream Governance, NumRules  | Attributed to the Kafka cluster.                                                                 | `lkc-*`                                                |
| ksqlDB (CSU)                                  | Attributed to the service account that owns the ksqlDB<br/>application.                          | `sa-*`                                                 |
| Audit Log read (`event-log`)                  | Split across service accounts in proportion to read volume.                                      | `sa-*`                                                 |
| Confluent Support (`support-cloud-developer`) | Allocated last, in proportion to each entity’s total chargeback<br/>cost from all other metrics. | Varies based on `sa-*`, `lkc-*`, `env-*`, and `clcc-*` |

When a metric cannot be attributed to a principal, the cost is recorded against
the resource ID with `owner_id` set to that resource. For example, the base
cost on a cluster with no service-account activity for the bucket would be
attributed to the resource owner.

To bill that cost to a team in your internal pipeline, attribute it to the team
that owns the resource using your own resource-ownership inventory.

#### IMPORTANT
Attribution quality depends on principal hygiene and how your organization
manages service accounts. If a single service account is shared across
applications or business units, the export cannot split that cost further.
The entire row attributes to the shared service account. Organizations with
shared, personal, or provisional service accounts might need to rationalize
principals before the export produces useful chargeback data.

<a id="cost-allocation-example"></a>

### Allocation example

This example shows how Confluent Cloud allocates costs across principals, using
usage-proportional splits for usage-driven metrics and weighted averages for
shared or fixed costs.

A Confluent Cloud environment incurs $33 in a month, across one Kafka cluster
(`lkc-123`), one Connect cluster (`lcc-456`), one Flink SQL compute pool
(`lfcp-789`), and Confluent Support. Four service accounts (`sa-abc`,
`sa-def`, `sa-ghi`, `sa-jkl`) are active during the month.

This is how cost allocation is distributed across rows with `owner_id`
values:

- The $2 of CKU cost on `lkc-123` is split across the four service accounts
  (`owner_id = sa-abc / sa-def / sa-ghi / sa-jkl`) using the read/write
  weighted ratio.
- The $6 of write throughput is split between the two accounts that wrote
  (`sa-abc`, `sa-def`).
- The $15 of read throughput is split between the two accounts that read
  (`sa-ghi`, `sa-jkl`).
- The $4 of Connect tasks is attributed to the Kafka cluster that owns the
  connector (`owner_id = lkc-123`). The internal pipeline maps that cluster
  to its owning team.
- The $3 of Flink cost is attributed to the environment
  (`owner_id = env-xxx`).
- The $1 of Cluster Linking cost is attributed to the source Kafka cluster
  (`owner_id = lkc-123`).
- The $1 of Schema Registry base cost is attributed to the Kafka cluster
  (`owner_id = lkc-123`).
- The $1 of Confluent Support is allocated last, in proportion to each
  entity’s share of the other metrics.

The sum of every `chargeback_cost` value is $33, the original usage charge.

<a id="cost-allocation-reconcile"></a>

## Reconcile with your invoice

To reconcile an export with your Confluent Cloud invoice, sum the `chargeback_cost`
column and compare the total to the usage charges subtotal on the invoice for
the same period.

For a monthly close, follow these steps:

1. Run a Monthly export at least 48 hours after the month ends so the month’s
   usage data is complete.
2. Sum the `chargeback_cost` column across every row, including
   `unallocated`, which can contain negative values for promotional credits.
3. Compare the sum to the usage charges subtotal on your Confluent Cloud invoice for
   the same period. Tax, marketplace pass-through, and prior-period adjustments
   appear on the invoice but are not in the export, so exclude them when
   reconciling.

If the export and invoice usage subtotal disagree, re-run the export after
another 24 hours to capture any late-arriving usage data. If the values still
disagree, contact [Confluent Support](https://support.confluent.io) with both
artifacts.

If Confluent issues a credit note or adjustment for a closed period, re-run
the export for that period to capture the change. The cost allocation pipeline
reflects the current state of the source usage data, not an immutable snapshot
of the prior export.

<a id="cost-allocation-multi-org"></a>

## Multi-organization usage

Cost allocation exports cover a single organization. If your business runs more
than one Confluent Cloud organization under a single contract, request a separate
export per organization, then combine the files in your downstream pipeline.

The export does not include an `org_id` column. If you combine exports from
these organizations into one table, add an `org_id` column at import time
so downstream queries can filter by organization.

Service-account, user, and resource IDs are organization-scoped, so the same ID
does not appear in two organizations. Track ownership using a
customer-maintained crosswalk from `(org, owner_id)` to your internal team or
cost center.

<a id="cost-allocation-choosing"></a>

## Native export versus chitragupta

You can run cost allocation natively in the Confluent Cloud Console or with
chitragupta. Both paths are supported. Use this table to decide which to run:

| Need                                        | Native cost allocation export   | chitragupta (open source)                         |
|---------------------------------------------|---------------------------------|---------------------------------------------------|
| Monthly finance close, single CSV           | Recommended                     | Possible                                          |
| Custom allocation rules and weights         | Not supported                   | Supported. You control the script.                |
| Live dashboards refreshed every few minutes | Not supported                   | Supported                                         |
| Topic-level attribution                     | Not supported                   | Supported, subject to API limits                  |
| Multi-organization rollup in one report     | Not supported                   | Supported, compose against multiple organizations |
| No infrastructure to operate                | Managed by Confluent            | Managed by customer                               |
| Audit-ready, vendor-published methodology   | Confluent documentation         | Customer-defined                                  |

It is common to run both options: the native export for monthly finance close
and chitragupta or another in-house pipeline for live dashboards and custom
views. You do not have to migrate from chitragupta to the native export.

## Related content

- [Manage Billing in Confluent Cloud](overview.md#cloud-billing)
- [Retrieve Invoices and Costs](invoices-and-costs.md#cloud-billing-invoices-costs)
- [Billing Dimensions](billing-dimensions.md#billing-dimensions)
- [Confluent Cloud Costs API](https://docs.confluent.io/cloud/current/api.html#tag/Costs-(billingv1))
- [Metrics API](https://api.telemetry.confluent.cloud/docs)
- [Predefined RBAC Roles in Confluent Cloud](../security/access-control/rbac/predefined-rbac-roles.md#cloud-rbac-roles)
- [chitragupta: open-source chargeback engine](https://github.com/waliaabhishek/chitragupta)
