Token Cost Calculator

Welcome to the Token Cost Calculator

This minimalist utility lets you estimate how much each message—or an entire 30‑message conversation—costs when using an LLM. Just enter your model’s input and output token prices plus your typical total‑token count. We assume completions account for a fixed 35 % of total tokens.

How it works

The calculator uses two equations:

Average price per token

p_avg = ((1 - 0.35) × P_in + 0.35 × P_out) / 1,000,000

where P_in and P_out are your per‑million prices for prompt and completion tokens.

Cost per message

cost_msg = T × p_avg

with T being the total tokens (prompt + completion) in a single exchange.

You can multiply the per‑message figure by the number of turns to price entire conversations automatically.

Calculator