Allocation rules for shared costs
The CostReveal team, , 4 minute read
Tags explain a lot, but never everything. A shared database serves five teams. A support plan covers the whole company. An account was created before anyone agreed on tags. Every cost platform needs a way to explain what tags cannot, and the danger is always the same: a rule nobody can read, applied in an order nobody remembers, quietly deciding who pays. This post is about how CostReveal's allocation rules stay readable, ordered and accountable.
A rule is a sentence
Every rule in CostReveal reads as a sentence anyone looking at the figures can check: "account search-prod belongs to team search", or "the shared AmazonRDS cost of account Production is split between payments and search, 60 and 40". There are two kinds:
- A rule that names an owner: lines that match its conditions belong to a team, feature, customer or user. What it explains is labelled inferred, exactly as a tag's would be.
- A rule that shares a cost: what is still unknown on a dimension for the lines it matches is shared among owners, and labelled allocated. It shares at fixed percentages that add up to exactly 100, evenly among the owners it names, or by explained spend, in proportion to what each owner's own evidence already explains that month.
A condition compares one part of a billing line, the provider, account, service, region, usage type, model, resource or a tag, with the values you enter: is, is not, starts with, contains, or is set at all. Every condition of a rule must hold.
Evidence first, rules after
The order is fixed and stated, so nobody has to guess which rule won:
- What the bill and tags say comes first: an owner named for an AI workspace, the resource's tags, then the caller's tags. A rule never overrides them.
- Then rules that name an owner, in the order shown: the first that matches applies.
- Then measured usage: a Kubernetes cluster divides what its nodes billed by what its workloads took, and a cloud's Databricks charges are divided by their usage. Measurement comes before a rule's assumption.
- Then rules that share a cost, in the same order.
- Then usage data from your application divides what is still unknown and nothing else claims.
A rule that contradicted a tag would make two people's numbers disagree about the same dollar. Putting evidence first means a rule only ever fills a gap.
Every month, every time
Every change to a rule, including turning it off or moving it, makes a new version, recorded with who made it. Every month is then explained again with the rules as they now are, so no figure, this month or any before it, rests on a rule that no longer applies. Each rule shows what it explains in the latest month, so a rule that matches nothing is easy to spot.
That matters most at month end. Chargeback statements, budgets and reports all read the same attribution, so a rule changes all of them consistently, and a closed chargeback statement keeps what it said when it was closed.
Shared exactly, never rounded up
A shared cost is divided once its month is explained, and each owner's part is rounded down to the tenth decimal place, so the parts never add up to more than the cost. What rounding leaves stays unknown rather than being handed to someone. A cost with no one to share among, such as a split by explained spend among owners with no spend of their own, stays unknown too.
On every plan
Shared cost allocation rules are on every plan, the free trial included. Explaining where money went is the point of the product, not an upgrade.
Frequently asked questions
Can a rule override a tag? No. What the bill and tags say always comes first; rules only explain what they leave unknown.
What happens to past months when I change a rule? Every month is explained again with the rules as they now are. Closed chargeback statements keep what they said.
How is a shared cost divided? At fixed percentages, evenly, or in proportion to what each owner's own evidence explains in the same month and currency.
How is a figure labelled when a rule explains it? A rule that names an owner is inferred, as a tag is. A shared cost is allocated.
Who can change rules? Owners and admins. Everyone who can see a project's costs can see its rules, and every change is in the audit log.
What if a rule matches nothing? Each rule shows what it explains in the latest month, so it is visible.
Keep reading
- Why CostReveal shows the spend it cannot explain: how unknown spend is kept in the open.
- Chargeback finance can close: statements that never change once closed.
- Connecting Kubernetes to CostReveal: a cluster's cost divided by what each workload took.