OpenAI Pricing Calculator

something

About this template

AI has been all the rage these days so we created a mini-app to help calculate how much a query would cost on each of OpenAi’s large language models (LLM). Currently the cost is pretty cheap, and can be as low as $0.0004 per thousand tokens, but for businesses that may use millions of tokens, the cost can stack up quickly. That’s why we built a quick calculator to compare the cost among all the different language models based on how many tokens you plan to use.

The calculator is simple. Enter the number of tokens for your prompt and see how the cost differs among all the different language models.

You can download a free Excel spreadsheet for Mac or PC by clicking the download button.

Here’s how we built this on calculator on Subset if you’re interested in building something similar for yourself.

It was quite simple. First, I went on https://openai.com/pricing to figure out the pricing for GPT-4, GPT-3.5, ChatGPT, Ada, Babbage, Curie, and Davinci.

I created an input for token prompt length input. If I wanted to I could have also created an input for number of words and made an assumption on how many words 1000 tokens can create, but in this calculator, I just used number of tokens.

Then for each of the language models, I created a section for Token Prompt Length, Cost per 1000 Tokens and Cost per Question.

  • Token Prompt LengthI just link that to the input I created earlier.
  • Cost per 1000 Tokens comes from the OpenAi pricing page.
  • Cost per Questionis just Token Prompt Length divided by 1000 and multiplied by the Cost per 1000 Tokens
Categories