LLM Inference Economics: How to Calculate the Real Cost of Deploying on High-End GPUs

    This article breaks down the economics of self-hosting a mid-sized LLM for inference on high-end compute cards. Instead of asking whether it is profitable, it shows how to calculate the gross margin per million effective tokens by focusing on utilization and effective throughput rather than hardware price. It covers cost decomposition, depreciation and residual value, why reselling or leasing hardware may be safer, three engineering levers that drive margin (batching and memory management, parallelism and quantization, request scheduling and fallback), competitive pressure from efficient third-party providers, how to read supply-demand signals, and a practical decision checklist.

    1. Framing the Question Correctly: Gross Margin per Million Effective Tokens

    “Can you make money deploying a mid-sized inference model on high-end compute cards?” is a question that keeps coming up in engineering and procurement decisions. Reducing it to a simple “yes” or “no” distorts the picture. A more rigorous framing is this: under a given workload profile and price constraints, is the contribution margin per million effective tokens positive, and can it cover the cost of capital and depreciation?

    Three typical views show up in these discussions. The first holds that official API prices have already been pushed so low that reselling leaves almost no room. The second argues that third-party inference providers are already the efficiency benchmark, so if upstream prices keep falling, margins will quickly turn negative. The third points out that upstream services frequently slow down and throw errors, which suggests demand is still tight and providers are making money. These three claims do not contradict each other; they correspond to three different facets: cost structure, competitive intensity, and supply-demand conditions.

    2. Breaking Costs Down to a Computable Granularity

    The total cost of a self-hosted inference service can be written as:

    1. cost per token = (card depreciation + power and datacenter + network and storage + labor + software and operations) / effective output tokens
    2. effective output tokens = peak throughput × utilization × time × effective ratio

    The key is the denominator, not the numerator. Hardware procurement is only the visible expense. What really determines success or failure is utilization and the effective ratio: whether requests involve long contexts, whether they are streamed, whether a large amount of truncated output gets discarded, and whether failed requests are retried. All of these can create a significant gap between “nominal throughput” and “billable throughput.”

    Depreciation must be calculated over the true economic life. High-end accelerator cards iterate quickly, and when supply is tight, second-hand premiums are obvious. This means the opportunity cost of “reselling the card” is high, but it also means that once a new generation ships in volume, residual value can fall quickly. Writing residual value assumptions into the model is closer to reality than counting only electricity costs.

    3. Why “Just Sell the Cards” Is Often Better

    If the goal of procurement is arbitrage rather than service, then holding the hardware is itself a highly liquid asset. In that case, building a self-hosted service means taking on three risks at once: tech-stack adaptation risk, customer-acquisition risk, and price-decline risk. Safer alternatives include signing long-term compute or inference service contracts with enterprises that have stable inference demand, or slicing resources into different specifications and reusing them across multiple tenants through a container platform, proving out utilization before talking about expansion.

    4. Three Engineering Lines That Determine Gross Margin

    1. Batching and memory management. Continuous batching, paged memory management, and prefix cache reuse are the most direct ways to raise throughput; system prompts and long-document scenarios benefit especially from prefix reuse.
    2. Parallelism and quantization strategy. Tensor parallelism is constrained by inter-card interconnect bandwidth, and pipeline parallelism introduces bubbles; weight quantization and KV cache quantization can trade memory and bandwidth for larger batches, but accuracy regression must be evaluated.
    3. Request scheduling and fallback. Pooling by input length, setting timeouts and queue limits, and automatically falling back to a smaller model or the official API during peak hours are the combination that protects both SLA and margin.

    An illustrative server-side configuration (expressing the idea only, not specific product parameters):

    1. # Pseudocode: pool by workload profile + prefix cache + peak fallback
    2. pools = {
    3. "short": Engine(max_batch=64, prefix_cache=True),
    4. "long": Engine(max_batch=8, kv_quant="int8"),
    5. }
    6. def route(req):
    7. pool = pools["long" if req.tokens > 8000 else "short"]
    8. if pool.queue_depth() > 200:
    9. return fallback_to_hosted_api(req) # peak overflow
    10. return pool.generate(req)

    5. Competition and Pricing: Pressure from the Efficiency Benchmark

    The industry already has third-party inference providers that lead on efficiency. Their existence shows that engineering optimization can create real margin, but it also means newcomers face an already-thinned price band. Once upstream models keep cutting prices, the margin room for the middle layer gets squeezed quickly, and can even turn negative. So a new entrant should not assume that “optimizing to the benchmark level” guarantees stable profit; optimization should be treated as an ongoing cost item, not a one-time dividend.

    6. How to Read Supply-Demand Signals

    A drop in API output speed and a rise in error rates usually point to tight supply, but that does not mean any third party can profit: during tight periods, customers care more about availability and become less price-sensitive, so only the side with capacity and operational capability captures the premium. When reading these signals, look at time-segmented success rates, first-token latency, and output rate together; a single metric is easy to misread.

    7. Decision Checklist

    • Measure the real workload first: input/output length distribution, peak curves, cache hit rate;
    • Then compute three scenarios: unit cost and break-even price under optimistic/neutral/pessimistic utilization;
    • Compare three paths: buying the official API directly, renting general-purpose compute, self-holding hardware and self-building;
    • Count depreciation and residual value, labor and channel costs in full, and do not keep “electricity-only” fake books;
    • If utilization stays below the break-even point for a long time, prefer elastic renting or resale/long-term contracts over heavy-asset self-building.

    Conclusion: the deciding factor in this business is not “whether you have high-end cards,” but the match between utilization, effective throughput, and the price band. Make the calculation a re-computable model and drive decisions with real load-test data, and you can judge whether you are truly making money in an environment where prices keep falling.