Open calculator ↗

AI API cost per paid subscriber · Calculation guide

Allocate monthly input and output token spend over paying subscribers.

Calculation guide

Enter billable uncached input and output tokens for one month, in individual tokens. Enter prices per million tokens. Include cache, tools or other API charges in other costs once.

peruser = (inputs*inputrate/1000000+outputs*outputrate/1000000+other)/subscribers; total = inputs*inputrate/1000000+outputs*outputrate/1000000+other; inputcost = inputs*inputrate/1000000; outputcost = outputs*outputrate/1000000

Inputs

Monthly uncached input tokens

Example entry 20000000.

Monthly output tokens

Example entry 5000000.

Input price per million tokens

Example entry 2 (in the selected currency).

Output price per million tokens

Example entry 8 (in the selected currency).

Other monthly API charges

Example entry 20 (in the selected currency).

Paying subscribers in month

Example entry 50. Use whole numbers.

Worked example

InputValue
Monthly uncached input tokens20,000,000
Monthly output tokens5,000,000
Input price per million tokens2
Output price per million tokens8
Other monthly API charges20
Paying subscribers in month50
ResultValue
API cost per paying subscriber2
Monthly API cost100
Input token cost40
Output token cost40

Calculation steps

API cost per paying subscriber = (((((Monthly uncached input tokens × Input price per million tokens) ÷ 1,000,000) + ((Monthly output tokens × Output price per million tokens) ÷ 1,000,000)) + Other monthly API charges) ÷ Paying subscribers in month)

(((((20,000,000 × 2) ÷ 1,000,000) + ((5,000,000 × 8) ÷ 1,000,000)) + 20) ÷ 50) = 2

Monthly API cost = ((((Monthly uncached input tokens × Input price per million tokens) ÷ 1,000,000) + ((Monthly output tokens × Output price per million tokens) ÷ 1,000,000)) + Other monthly API charges)

((((20,000,000 × 2) ÷ 1,000,000) + ((5,000,000 × 8) ÷ 1,000,000)) + 20) = 100

Input token cost = ((Monthly uncached input tokens × Input price per million tokens) ÷ 1,000,000)

((20,000,000 × 2) ÷ 1,000,000) = 40

Output token cost = ((Monthly output tokens × Output price per million tokens) ÷ 1,000,000)

((5,000,000 × 8) ÷ 1,000,000) = 40

How each input affects this example

Each row starts from the worked example and changes one input.

InputOriginal inputNew inputAffected resultOriginal resultNew result
Monthly uncached input tokens20,000,00022,000,000API cost per paying subscriber22.08
Monthly output tokens5,000,0005,500,000API cost per paying subscriber22.08
Input price per million tokens23API cost per paying subscriber22.4
Output price per million tokens89API cost per paying subscriber22.1
Other monthly API charges2022API cost per paying subscriber22.04
Paying subscribers in month5055API cost per paying subscriber21.818182
AI API cost per paid subscriber →