Cost allocation
  • 24 Jun 2026
  • 3 Minutes to read
  • Dark
    Light
  • Download PDF

Cost allocation

  • Dark
    Light
  • Download PDF

Article summary

Introduction

Cost allocation lets you split the cost of a shared parent resource across its child resources using a distribution strategy you define. This gives your teams accurate visibility into what each service or database actually costs, rather than attributing the full cost of the shared resource to a single owner.

Cost allocation is supported for two parent resource types:

App Service Plan - costs are distributed to the Web Apps and Function Apps running under the plan.
SQL Elastic Pool - costs are distributed to the SQL databases within the pool.

Permissions

Cost allocation can be configured only by users with sufficient permissions.

The following roles have access:
• Account Owner
• Owner
• Contributor
• Users with a custom role that has group management permission enabled

All other users cannot access the cost allocation feature.

Setting Up Cost allocation

Cost allocation is configured per cost management group.

To open the cost allocation panel:

  1. Go to Cost Analyzer and select the cost management group you want to configure.
  2. Click the three-dot icon (⋮) next to the group name and select Cost allocation from the context menu.

Cost allocation.png

The panel shows any existing rules for the group, along with an option to add a new one.
Note: Rules created in a child group override the parent group's rules for that group.

Adding an allocation rule

  • Click + Add allocation rule to open the three-step wizard.

Add allocation rule.png

Step 1: Resource

Give the rule a name (required) and an optional description. Then choose the resource type the rule applies to — either App Service Plan or SQL Elastic Pool — and select the specific resource from the list that appears. A single rule covers one resource type.

Resource selection.png

Step 2: Strategy

Choose how the parent resource's cost will be distributed across its child resources. Three strategies are available:

Metric-based allocation - Distributes costs proportionally based on a usage metric measured at the child resource level. You choose the metric in the next step. This strategy reflects actual usage and is the most precise option.

Metric-based strategy.png

Equal split - Divides the parent's cost equally across all child resources. No further configuration is required. For example, a pool with 4 databases costing $500/month would assign $125 to each database.

Equal-split.png

Percentage-based - Lets you manually assign a fixed percentage to each child resource. The total across all children must equal exactly 100% per parent resource.
You cannot add multiple rules for the same resource type within a group.

Percentage-based.png

Step 3: Configuration

The configuration step depends on the strategy selected.

For metric-based allocation, select the usage metric to use for proportional distribution. Available metrics depend on the resource type — for example, SQL Elastic Pool supports dtu_consumption_percent (DTU Percentage), cpu_percent (CPU Percentage), and storage_percent (Storage Percentage). The selected metric is measured at the child resource level, not the parent. A live example in the panel shows how costs would be distributed across child resources based on current metric values.

For equal split, no configuration is needed. The panel confirms that costs will be divided equally and shows a preview of the distribution.

For percentage-based allocation, a table lists each child resource under the parent. Enter a percentage for each child. The panel tracks the running total and requires it to reach exactly 100% before the rule can be saved.

  • Click Add rule to save. The rule takes effect within a few minutes.

Rule inheritance

Cost allocation rules set on a parent group apply automatically to any child groups that have no rules of their own. Once a child group has at least one allocation rule configured, the parent group's rules no longer apply to that child group — the child group's own rules take precedence entirely.

Viewing allocated costs in Analysis

After adding a cost allocation rule, wait a few minutes for the data to reflect before checking the Analysis view.

Resources with cost allocation rules appear with a Child resource option in the Expand by menu. To see the breakdown:

  1. Go to the Analysis tab of the cost management group.
  2. Set Group by to Resource.
  3. Right-click on a parent resource in the chart (such as a SQL Elastic Pool or App Service Plan).
  4. Select Expand by > Child resource.

Choosing a time interval for which the parent resource has no associated cost data will result in the Group by filter value being reset.

Expand by child resource.png

The chart will break down the parent resource's cost across its child resources according to the allocation rule.

Child resources.png

The child resource expansion can also be accessed from the Cost group overview dashboard. Selecting it takes the user to the Analysis section, which displays child resource costs based on the configured rule and the time interval defined in the dashboard widget.

Expand from Overview dashboard.png


Was this article helpful?

What's Next