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

# Cost per feature

> Attribute spend to the features of your product, including the shared platform underneath them.

Cost per feature shows what each part of your product costs to run, so you can weigh it against what the feature earns or how much it is used.

**Time**: 30 to 60 minutes for a first version.

## Before you start

* At least one cloud or AI provider connected. See [Integrations overview](https://docs.optimazehq.com/overview-page.md).
* A way to tell features apart in your billing data. Any of these works, and you can mix them:
  * a feature or component tag or label on resources
  * services or resource names that belong to one feature, such as a dedicated database or function
  * separate accounts, projects or namespaces per feature
* A rough idea of how shared infrastructure is used by each feature, for the cost no tag can separate.

## Build the model

**1. Choose where the features live**

If features are how your business reports, add them under the product group of your Financial Operating Model, so budgets, goals and unit economics can use them. If you are exploring, create an ad-hoc model instead: open **Attribution**, select the create icon and choose **Create ad-hoc model**.

**2. Add a node for each feature**

Open the editor and ask Atlas, for example:

> Under Product, add nodes for Search, Reporting and Exports. Attribute spend tagged feature=search to Search, feature=reporting to Reporting, and the Lambda functions starting with export- to Exports.

To do it by hand, select **Manual Editor**, add a child node per feature, then open each node's **Billing** tab and add the filters that pick out its spend. See [Edit and publish a model](https://docs.optimazehq.com/attribution/editing-models.md).

**3. Add a node for shared cost**

Add a node such as *Shared platform* and attribute the infrastructure every feature uses to it: shared clusters, databases, networking, observability.

**4. Share the platform across features**

Add a [showback](https://docs.optimazehq.com/attribution/showbacks.md) with **Source** set to **Node**, **Source node** set to *Shared platform*, and the feature nodes as **Target nodes**. Choose **Proportional** to share it in line with each feature's direct spend, or **Fixed weights** if you know a better split, such as share of requests or compute time.

**5. Publish**

Check **Coverage** and look at what is left in **Unattributed**, then select **Publish**.

## Read cost per feature

* On the attribution view, choose the **Cost** surface to see each feature's spend for the date range and its trend.
* In [Analytics](https://docs.optimazehq.com/analytics.md), turn on **Include allocations** to include the shared platform cost each feature carries.
* Add the model to a [dashboard](https://docs.optimazehq.com/dashboards.md) for a standing view.

To go a step further, divide a feature's cost by how much it is used, for example cost per search or cost per report. Create a [unit economic](https://docs.optimazehq.com/unit-economics.md) with **Cost from** set to the feature node and **Divide by** set to a usage metric for that feature.

## Check your numbers

* Features plus *Shared platform* plus **Unattributed** should add up to the parent node.
* A feature that shows no cost usually means its filter does not match: check the tag key and value, which are case sensitive in most providers.

## Next

* [Cost per customer for a feature](https://docs.optimazehq.com/guides/feature-cost-per-customer.md)
* [Feature cost per subscription tier](https://docs.optimazehq.com/guides/feature-cost-per-subscription-tier.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.