4 is the example result. Read it using the units and relationship stated below.
OpenAI API Cost uses input tokens, input cost per 1m tokens, output tokens.
Keeping usage and formats tied to the receiving system
For openai api cost, the relationship is Result = [Input tokens] ÷ 1000000 × [Input cost per 1M tokens] + [Output tokens] ÷ 1000000 × [Output cost per 1M tokens]. The amount depends on the supplied input tokens, input cost per 1m tokens, rather than a live market price or a value imported from another record. A technical estimate needs the billable unit or output format the receiving system expects. Requests, tokens, storage and transfer can have separate rates. A text transformation should preserve meaningful characters rather than promise validation it does not perform.
What the model includes
Result = [Input tokens] ÷ 1000000 × [Input cost per 1M tokens] + [Output tokens] ÷ 1000000 × [Output cost per 1M tokens] Use current rate-card values for cost fields and a representative source sample for conversion tools. Cached requests, retries and region charges may change an invoice. A successful local transformation does not establish that an external API will accept the record. Keep the original source alongside the result. Before deployment, check the output in the target environment and record any exclusions, such as a rough token estimate or formatting without a parser.
Example with the supplied inputs
Input tokens: 500000; Input cost per 1M tokens: 5; Output tokens: 100000; Output cost per 1M tokens: 15. Result: 4. The values are illustrative.
Compare one changed input
Input tokens changes from 500000 to 550000. The result becomes 4.25. All other inputs remain fixed.
Calculation rule
Result = [Input tokens] ÷ 1000000 × [Input cost per 1M tokens] + [Output tokens] ÷ 1000000 × [Output cost per 1M tokens]
Inputs and output
| Input | Example value | Entry convention |
|---|---|---|
| Input tokens | 500000 | Use the source quantity represented by input tokens. Keep the counted population fixed and avoid mixing a unit value with a period total. |
| Input cost per 1M tokens | 5 | Use input cost per 1m tokens on the currency and period basis shown by the formula. Keep gross amounts, net amounts and unit amounts distinct; the page does not fetch a price or exchange rate. |
| Output tokens | 100000 | Use the source quantity represented by output tokens. Keep the counted population fixed and avoid mixing a unit value with a period total. |
| Output cost per 1M tokens | 15 | Use output cost per 1m tokens on the currency and period basis shown by the formula. Keep gross amounts, net amounts and unit amounts distinct; the page does not fetch a price or exchange rate. |
Output: 4 is the example result. Read it using the units and relationship stated below. Use the formula to distinguish a cash amount, count, percentage or ratio.
How to use the page
Collect the inputs
Gather Input tokens, Input cost per 1M tokens, Output tokens. Use one period and the units shown in the form.
Run the calculation
Enter the values and select the action. The calculation rule above explains how the inputs produce the result.
Compare a scenario
Change Input tokens on its own, keeping the other inputs fixed. Read both results before changing another assumption.
Worked example
With the example inputs listed above, the result is 4.
Change Input tokens from 500000 to 550000 while keeping every other value fixed. The result becomes 4.25. This comparison isolates that input; it does not forecast how other variables will respond.
Check the stated formula, units and limits before using the result in a decision.
Keep the displayed formula, input units and model scope with the result. Corrections or questions can be sent through the request section on this page.
Content updated: October 11, 2026