# Cost center allocation for different products

Learn how your spending is assigned to cost centers for licensed and metered products.

This article contains reference information for how spending is assigned to cost centers. To create and manage cost centers, see [Using cost centers to allocate costs to business units](/en/billing/how-tos/products/use-cost-centers).

## Overview

To allocate metered spending to a cost center, you add repositories, organizations, or users to the cost center.

* For **usage-based** products, like GitHub Actions, cost centers are charged based on the **repositories or organizations** in the cost center, as this is where the usage takes place.
* For **license-based** products, like GitHub Copilot, cost centers are charged based on the **users** in the cost center.
* For products billed by **AI credit** usage, like Copilot cloud agent, cost centers are charged based on the **users** in the cost center, or the **organization that granted the user's GitHub Copilot license** if the user isn't directly assigned to a cost center.

Cost centers only apply to metered usage, and do not work with volume or subscription billing.

## Breakdown by product

| Product                  | A cost center is charged if it contains this resource                                                           |
| ------------------------ | --------------------------------------------------------------------------------------------------------------- |
| GitHub Actions           | The repository or organization where the workflow runs.                                                         |
| GitHub Codespaces        | The repository or organization where the codespace is created.                                                  |
| GitHub Copilot license   | The user who receives the license (priority), or the organization that is billed for the Copilot license.       |
| GitHub Enterprise        | The user who receives the license (priority), or the organization that is billed for the license.               |
| Git Large File Storage   | The repository or organization where Git LFS is used.                                                           |
| GitHub Packages          | The repository or organization that owns the package.                                                           |
| AI credits               | The user who triggered AI credit usage (priority), or the organization that granted the user's Copilot license. |
| GitHub Advanced Security | A user who uses a license (priority), or the organization that is billed for the license.                       |

## Details for license-based products

To ensure your cost centers reflect spending as intended, it's important to understand how the cost of licenses is allocated to cost centers, and how changes are reflected in your bill.

| User associated with a cost center | License granted                              | License and product costs charged                                                                                                                                                                                                            |
| ---------------------------------- | -------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Direct assignment                  | By any organization                          | To the **cost center** the user is assigned to.                                                                                                                                                                                              |
| By enterprise team membership      | By any organization                          | To the **cost center** the user's enterprise team is assigned to. Direct assignment to another cost center takes precedence; if the user is in multiple enterprise teams assigned to different cost centers, the team created first applies. |
| By organization membership only    | By an organization assigned to a cost center | To the **cost center** the organization belongs to. If the organization does not belong to a cost center, to the **enterprise**.                                                                                                             |

When you assign an enterprise team to a cost center, its members are allocated to that cost center the same way other group-based assignments are, and membership stays current automatically as people join or leave the team. If a user is also assigned to a different cost center directly, the direct assignment takes precedence. If a user belongs to more than one enterprise team, and those teams are assigned to different cost centers, the user is associated with the cost center of the enterprise team that was created first.

Users who belong to multiple organizations in an enterprise or who receive a Copilot license from multiple organizations:

* **GitHub Enterprise** and **GitHub Advanced Security** license usage is allocated to the oldest organization and charges are allocated to the cost center containing that organization.
* **Copilot** license and product usage is allocated to one of the organizations and charges are allocated to the cost center containing that organization.

To confirm which organization is charged for a given user's license, you can request a detailed usage report. See [Billing reports reference](/en/billing/reference/billing-reports#detailed-usage-report).

See [GitHub Copilot billing for organizations and enterprises](/en/copilot/concepts/billing/organizations-and-enterprises#seat-assignment).

## Understanding cost center usage and attribution

To view usage by cost center, go to the "Usage" page and group or filter by cost center. Any usage that is not assigned to a specific cost center is categorized as "Enterprise Only" when grouping by cost center. See [Gathering insights on your spending](/en/billing/tutorials/gather-insights).

To understand how usage for a specific resource is being attributed to cost centers, request a detailed usage report and refer to the `cost_center_name` column. See [Billing reports reference](/en/billing/reference/billing-reports).

## Effects of changes to cost centers

You can change the included resources of a cost center or delete a cost center at any time. This affects the cost center in different ways.

### Deleting a cost center

If a cost center is deleted, future usage of its resources will be charged to the enterprise. Usage before deletion is charged to the cost center.

You can still view the cost center even after you delete it. To do so, select the "Deleted" tab on the cost center page.

### Adding or removing a member

If you add a member to a cost center, any future usage will be charged to the cost center. If you remove a member from a cost center, any future usage will be charged to the enterprise. For example:

| Date   | Scenario                                                                                                     | Effect                                                                                          |
| ------ | ------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------- |
| May 1  | An enterprise has three Copilot users.                                                                       | The charges for all three users are charged to the enterprise.                                  |
| May 10 | You create two cost centers: Cost Center 1 with User A and User B as members, and Cost Center 2 with User C. | Future charges for Users A and B are charged to Cost Center 1, and for User C to Cost Center 2. |
| May 20 | You remove User A from Cost Center 1.                                                                        | Future charges for User A are charged to the enterprise.                                        |

### Deleting a user from the enterprise

Removing a user from an enterprise will not remove the user from the cost center. This ensures that the remaining usage attributable to the user will be allocated to the cost center.

## Example for license-based products

The following example illustrates how usage is assigned to cost centers for license-based products. Based on four licensed users, their organization membership, and how cost centers are set up, you will see how usage is allocated to cost centers.

### The users

![Diagram illustrating the description of four users and their organization membership.](/assets/images/help/billing/cost-center-example-1.png)

There are four users, each a member of one or more organizations in the enterprise.

| User     | Organization membership |
| -------- | ----------------------- |
| `user-1` | `org-1`, `org-2`        |
| `user-2` | `org-1`                 |
| `user-3` | `org-1`                 |
| `user-4` | `org-1`, `org-2`        |

All users have a license for **GitHub Copilot** provided by `org-1` and **GitHub Enterprise** (GHE).

**GitHub Secret Protection** (GHSP) is enabled in `org-1`, where all users are active committers.

### The cost centers

There are two cost centers in the enterprise, each with different users or organizations assigned.

| Cost center   | Assigned resources |
| ------------- | ------------------ |
| Cost Center A | `user-1`, `user-3` |
| Cost Center B | `org-1`            |

`user-2`, `user-4`, and `org-2` are **not** assigned to any cost center.

### How usage is allocated

<div class="ghd-tool rowheaders">

|               | Copilot charges    | GHSP charges       | GHE charges        | Explanation                                                                                                                                                                                                |
| ------------- | ------------------ | ------------------ | ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Cost Center A | `user-1`, `user-3` | `user-1`, `user-3` | `user-1`, `user-3` | These users are assigned directly to the cost center.                                                                                                                                                      |
| Cost Center B | `user-2`, `user-4` | `user-2`, `user-4` | `user-2`, `user-4` | These users aren't directly assigned to a cost center, so GitHub Copilot, GitHub Enterprise Cloud with data residency, and GitHub Secret Protection charges are assigned based on organization membership. |

</div>