Working out AI coding cost per project comes down to two decisions and one formula. The decisions are how you attribute shared work and what counts as a task. The formula is tokens times model rate, summed and divided by tasks. Get the decisions wrong and the arithmetic produces a confident number that nobody should act on. The UsageAtlas guide exposes the same assumptions.

The formula, with its assumptions exposed

project_cost = sum(tokens_by_model * rate_by_model)
cost_per_task = project_cost / completed_tasks

The first line needs a rate per model, which means the record must keep the model alongside the tokens. The second line needs a task definition, which is a management choice.

Most disagreements about AI cost trace back to one of those two inputs, not to the multiplication.

The five buckets

Bucket Contents Treatment
Direct One repository, one feature Full cost to that project
Shared Cross-repo refactor Split by a written rule
Platform Tooling and setup Not charged to a product
Separate Abandoned sessions Reported, not allocated
Unallocated No working directory Visible, never hidden

The fifth bucket is the one that separates a careful report from a decorative one. A session with no directory cannot be attributed, and pretending otherwise moves cost into a project that did not cause it.

Why weekly

A monthly number averages a quiet sprint with a heavy refactor and describes neither. Weekly figures keep the outlier visible, and they arrive while the cause is still remembered.

They also give an early warning about a plan: two hot weeks in a row is a signal that the ceiling is near.

Where the data comes from

UsageAtlas groups local sessions by project and shows per-provider totals across 7, 30 or 90 days, which is enough to run the formula without exporting transcripts. Local tracking needs no account, and prompts are not uploaded.

What it will not do is choose your attribution policy. That belongs to whoever owns the budget.

The comparison trap

Comparing two assistants on a weekly total is unfair, because each tool gets used for different kinds of work. The per-project figure fixes that, provided the same project is measured in both.

The clean version of the experiment: one repository, two weeks, two tools, same task definition. Everything else is an anecdote.

Reporting it upward

Three numbers, in this order: the monthly tool cost, the per-project usage cost, and the share of usage that could not be attributed.

That third number is what makes the other two credible. A report that hides it will be challenged the first time someone compares totals.

FAQ

Is a proportional split of shared work acceptable?

Yes, if the rule is written and applied consistently. Reproducibility matters more than precision.

Should the plan fee appear in project cost?

No. It is fixed and unrelated to the work, so charging it to projects distorts comparisons.

What if sessions lack a working directory?

They belong in the unallocated bucket. A large share there means the per-project figure is unreliable.

The takeaway

Expose the assumptions, keep unallocated work visible, and recalculate weekly. The formula is trivial; the discipline is not.