Retrieval Augmented Generation Cost per Task Calculator

This calculator estimates the fully loaded cost of one retrieval-augmented generation task. It combines embedding or query-processing expense, vector-search cost, model input and output token charges, infrastructure allocation, and other per-request fees into a single unit cost.

A per-task view is useful for pricing an AI feature, comparing model or retrieval configurations, and forecasting how usage growth affects spend. The calculator also converts the result into a monthly total for a selected task volume and shows which component contributes the largest share. Enter contract-specific rates whenever possible; provider pricing units differ, and self-hosted costs should include the portion of compute and operations attributable to the workload rather than only raw hardware rental.

Inputs

tokens
tokens
USD
USD
USD
USD
USD
tasks
Result
Estimated cost per RAG task
Estimated monthly cost
Model token cost per task
Non-model cost per task
Model share of task cost

1. Enter token usage
Use average uncached input and generated output tokens for one completed task.

2. Add model rates
Enter prices per one million tokens in the same currency.

3. Include retrieval and infrastructure
Allocate vector search, embedding, compute, storage, observability, and related charges on a per-task basis.

4. Set monthly volume
Use completed billable tasks, excluding retries only when their cost is already embedded in another input.

5. Review unit and monthly economics
Compare the model share with non-model costs before choosing an optimization strategy.

Input model cost = input tokens / 1,000,000 × input rate Output model cost = output tokens / 1,000,000 × output rate Cost per task = input model cost + output model cost + retrieval cost + infrastructure cost + other cost Monthly cost = cost per task × monthly tasks

All rates must use the same currency. The estimate is an average unit-cost model and assumes the entered token counts and per-task allocations represent the selected workload mix.

What the result means

The main result is the estimated average direct and allocated cost of completing one RAG task.

Taxes, committed-use discounts, free tiers, failed requests, and support labor are included only when you add them to the inputs.

Given: 2,200 input tokens at $2.50 per million, 450 output tokens at $10 per million, $0.0018 retrieval cost, $0.003 infrastructure allocation, $0.0005 other cost, and 500,000 monthly tasks.

Calculation: Input cost = 2,200 / 1,000,000 × $2.50 = $0.0055. Output cost = 450 / 1,000,000 × $10 = $0.0045. Cost per task = $0.0055 + $0.0045 + $0.0018 + $0.003 + $0.0005 = $0.0153. Monthly cost = $0.0153 × 500,000 = $7,650.

Result: Each task costs about $0.0153, and the modeled monthly spend is $7,650. Model tokens account for about 65.4% of the unit cost.

Should cached tokens use the standard input rate?

Use the rate that actually applies to cached input for your provider or serving stack. You can place the blended effective amount in the input-rate field.

How do I allocate shared infrastructure cost?

Divide the workload’s monthly share of compute, storage, networking, and operations by completed tasks. Use a consistent allocation method across alternatives.

Do failed requests count as tasks?

They consume resources even when no useful result is delivered. Include their cost through higher average token or infrastructure inputs, or adjust the monthly volume and allocations explicitly.

Why separate model and non-model cost?

The split shows whether prompt, model, retrieval, or platform changes are more likely to reduce unit economics. Optimizing a small component will have limited total impact.

Can this result be used as a customer price?

It is a cost estimate, not a complete price. Pricing may also need margin, support, sales, compliance, taxes, and demand considerations.