Work out what an AI feature will cost before you build it. You type the price per million input and output tokens from your provider's price page, how many tokens a typical request uses, and how many requests you expect per day. The calculator returns the cost per request, per day, per month and per user, and can compare a second price list side by side. No prices are built in, so it never goes out of date.
Most providers bill by the token, with separate prices for what you send (input) and what comes back (output). A token is a chunk of text, roughly three quarters of an English word. Because the two prices differ, you need four numbers to price a request: input tokens, output tokens, input price and output price.
Volume then does the rest. A request that costs a fraction of a cent looks harmless until it runs 50,000 times a day. Multiply the cost per request by daily requests and by the days in a month, and compare the total with what each user pays you. If the monthly cost per user is close to your price per user, the feature needs a cheaper setup or a limit.
Shorten what you send. Long instructions, big pasted documents and full chat histories are input tokens you pay for on every call. Trimming a 3,000-token prompt to 1,500 cuts the input cost in half, and if your provider offers cheaper cached input, putting the unchanging part of the prompt first lets more of it be cached.
Cap the output. A maximum length on answers protects you from rare, very long responses, which cost the most per token. You can also use a smaller, cheaper option for easy requests and keep the expensive one for hard cases. Use the comparison box to see what that split would save over a month.
Cost = (input tokens x input price + output tokens x output price) / 1,000,000, with prices quoted per million tokens. A request with 1,000 input tokens and 500 output tokens at 1 and 2 per million costs (1,000 x 1 + 500 x 2) / 1,000,000 = 0.002.
Prices change often and differ between providers, models and plans. A built-in table would be wrong sooner or later, so you type the numbers from your provider's current price page. The starting values are placeholders to show how the tool works.
Some providers charge a lower price for input tokens that are repeated from an earlier request. Enter the share of your input that is cached and the cached price. The input cost becomes input tokens x ((1 - share) x input price + share x cached price). With a 50 percent share and a cached price of 0.25 against an input price of 1, the input price falls to an average of 0.625.
It divides the number of characters by four and rounds up, which is a common rule of thumb for English. It can be off by 20 percent or more for code, numbers or non-English text. Use it for planning and check real counts with your provider's tool before you commit to a budget.
No. It multiplies the numbers you entered. Real bills depend on actual usage, rate plans, taxes and fees, so treat the result as an estimate and not as financial advice.
Related: SaaS metrics calculator, Burn rate calculator, ROI calculator.
Start for free or see all free tools. We.Inc is free to start, with no card needed. AI building is on paid plans from $20 a month.
We.Inc is an AI-powered website builder you can resell under your own brand. Launch a branded client dashboard, bill on Stripe Connect, and deliver AI-generated websites in minutes. White-label plans start at $99 a month for 25 client sites, with a 7-day free trial and no per-site fees.