<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: doret</title>
    <description>The latest articles on DEV Community by doret (@doretprism).</description>
    <link>https://dev.to/doretprism</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4250361%2Fe366a700-71d2-4f32-8251-0067888c058d.png</url>
      <title>DEV Community: doret</title>
      <link>https://dev.to/doretprism</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/doretprism"/>
    <language>en</language>
    <item>
      <title>How to calculate LLM cost per customer (and why the average misleads)</title>
      <dc:creator>doret</dc:creator>
      <pubDate>Tue, 17 Nov 2026 17:39:50 +0000</pubDate>
      <link>https://dev.to/doretprism/how-to-calculate-llm-cost-per-customer-and-why-the-average-misleads-507p</link>
      <guid>https://dev.to/doretprism/how-to-calculate-llm-cost-per-customer-and-why-the-average-misleads-507p</guid>
      <description>&lt;p&gt;If you run a product on OpenAI or Anthropic models, your cost isn't per customer. It's per token. To price your product sanely you need to turn one into the other.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: cost per request
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cost per request = input_tokens × input_price / 1,000,000
                 + output_tokens × output_price / 1,000,000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example: Claude Sonnet 5.5 at $2 input and $10 output per million tokens, a chat reply with 2,000 input and 400 output tokens:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;2,000 × $2 / 1M  = $0.004
  400 × $10 / 1M = $0.004
                   ------
                   $0.008 per request
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Don't forget the input side includes everything you send: system prompt, conversation history, retrieved documents, tool results. For agents the input usually dominates.&lt;/p&gt;

&lt;p&gt;Some models charge a higher rate above a context threshold. For example, Claude Haiku 5.5 at 150,000 input / 1,000 output tokens is billed at the long-context rate ($0.50 / $2.50 per 1M), so a request costs $0.0775.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: cost per customer
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cost per customer = cost per request × requests per customer per month
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At 300 requests a month: $0.008 × 300 = $2.40 per customer. With 200 customers: $480 a month.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: don't stop at the average
&lt;/h3&gt;

&lt;p&gt;$2.40 is the average, and averages hide the distribution. In most products a minority of customers makes most of the requests.&lt;/p&gt;

&lt;p&gt;Say 10% of customers make half the requests. With 200 customers and 60,000 requests a month:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;20 heavy customers share 30,000 requests: 1,500 each, so &lt;strong&gt;$12 per customer&lt;/strong&gt;, 5× the average&lt;/li&gt;
&lt;li&gt;180 other customers share the other 30,000: about 167 each, so $1.33 per customer&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On a cheap chat product that's fine. On an agent product it isn't. At 30,000 input / 2,000 output tokens per step and $1/$5 per million tokens, a step costs $0.04. At 1,000 steps a month the average customer costs $40. Under the same 10%/50% split, a heavy customer costs $200, twice the price of a $99 plan.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: measure the real distribution
&lt;/h3&gt;

&lt;p&gt;The 10%/50% split is an assumption. To know your real numbers you need usage per customer, which you can get by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;tagging every request with a customer id in your own logs&lt;/li&gt;
&lt;li&gt;using a separate API key or project per customer, then reading the provider's usage report per key&lt;/li&gt;
&lt;li&gt;routing requests through a gateway that records the customer&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Calculator
&lt;/h3&gt;

&lt;p&gt;To skip the arithmetic, I made a free calculator with current OpenAI and Anthropic prices. No signup needed: &lt;a href="https://doretprism.com/calculator?utm_source=devto" rel="noopener noreferrer"&gt;https://doretprism.com/calculator?utm_source=devto&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It uses standard list prices; prompt caching and batch discounts can lower real costs.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>openai</category>
      <category>llm</category>
      <category>saas</category>
    </item>
  </channel>
</rss>
