# Cost Estimation for Machine Translation using Tiktoken

**URL:** <https://community.openai.com/t/cost-estimation-for-machine-translation-using-tiktoken/1118785>\
**Category:** API\
**Tags:** cost, api-costs\
**Created:** [February 12, 2025, 11:22am UTC](https://community.openai.com/t/cost-estimation-for-machine-translation-using-tiktoken/1118785 "2025-02-12T11:22:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![na50r](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/na50r/32/551384_2.png) [@na50r](https://community.openai.com/u/na50r)\
**Post date:** [February 12, 2025, 11:22am UTC](https://community.openai.com/t/cost-estimation-for-machine-translation-using-tiktoken/1118785/1 "2025-02-12T11:22:48Z")

</div>

So I want to confirm if my cost computation is right because the difference seems to be much greater from what I’ve read online.

I want to compare DeepL and ChatGPT for machine translaton and tried to estimate costs.

For DeepL, I performed the translation task using 10 \* 2k sentence into one language which got cost about 80 Euros.  
I have to do this task 11 times, so it would cost me 880 Euros. For DeepL, I just compute the costs using character counts. But I know for sure that it took 80 Euros when I translated 10 \* 2k sentences, I saw the usage cost on my dashboard, so I have some confidence that cost estimation is close to the real cost I will have in the end.

For ChatGPT, since the cost is done with tokens, I used the text 10 \* 2k sentences and tokenized them with tiktoken. This yielded me about: 1,260,000 tokens. The cost for GPT4o Input is 2.5 USD per 1M tokens and the cost for output is 10 USD for 1M tokens.

So I assume, if I want to estimate the cost for translating 10 \* 2k sentences into one language, I get:  
(1260000 / 1M )\* 2.5 + (1260000/ 1M) \* 10 = 15.75 USD

And if I do this 11 times, I get 15.75 \* 11 = 173.25 USD.  
Which is about 5 times cheaper than DeepL (Omitting Euro / USD conversion)

Did I make a mistake in the cost computation or is this correct?
