Skip to main content
Glama

Mode VC: AI Venture Research Charts & Investor Atlas

LLM Inference Cost and Gross Margin Calculator

calc_llm_inference_cost
Read-onlyIdempotent

Estimates monthly LLM spend, cost per user and per request, prompt-cache savings, savings from routing a share of requests to a cheaper model, and gross margin against a target, for an AI product on any current Claude, GPT, Gemini, DeepSeek or Grok model at list price. Compares 9 common models. Same math and the same dated price file as https://modevc.com/tools/llm-inference-calculator.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "calc_llm_inference_cost"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNoMain model. Web default claude-sonnet-5-5.
route_modelNoCheaper model for routed requests. Web default claude-haiku-5-5.
cache_hit_pctNoShare of input tokens served from the prompt cache, in percent. Web default 40.
route_share_pctNoShare of requests sent to the cheaper model, in percent. Web default 0.
requests_per_userNoRequests per user per month. Web default 40.
target_margin_pctNoTarget gross margin after model costs, in percent. Web default 80.
price_per_user_usdNoMonthly revenue per user in USD. Web default 20.
monthly_active_usersNoWeb default 5,000.
input_tokens_per_requestNoWeb default 1,200.
output_tokens_per_requestNoInclude thinking tokens. Web default 400.

Output Schema

NameRequiredDescriptionDefault
as_ofNo
provenanceYes
source_urlsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "as_of": {
      +      "type": "string"
      +    },
      +    "provenance": {
      +      "properties": {
      +        "as_of": {
      +          "type": "string"
      +        },
      +        "as_of_basis": {
      +          "type": "string"
      +        },
      +        "sources": {
      +          "items": {
      +            "type": "object"
      +          },
      +          "type": "array"
      +        }
      +      },
      +      "required": [
      +        "as_of",
      +        "as_of_basis",
      +        "sources"
      +      ],
      +      "type": "object"
      +    },
      +    "source_urls": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "provenance"
      +  ],
      +  "type": "object"
      +}
  2. Changed19 schema fields changed
    • removedInput schema / properties / input_tokens_per_request / exclusiveMinimum
      Removed value: -0
    • changedInput schema / properties / input_tokens_per_request / minimum
      Previous value: -1New value: +0
    • removedInput schema / properties / input_tokens_per_request / zeroNote
      Removed value: -"the web calculator replaces 0 with its default"
    • changedInput schema / properties / model / description
      Previous value: -"Primary model. Web default claude-3-7-sonnet."New value: +"Main model. Web default claude-sonnet-5-5."
    • changedInput schema / properties / model / enum
      Previous value: -[
      -  "claude-3-7-sonnet",
      -  "gpt-4o",
      -  "gemini-2-5-pro",
      -  "deepseek-v4",
      -  "claude-3-5-haiku",
      -  "gpt-4o-mini",
      -  "gemini-2-5-flash",
      -  "groq-lpu-qwen"
      -]New value: +[
      +  "claude-fable-5-1",
      +  "claude-opus-5-5",
      +  "claude-sonnet-5-5",
      +  "claude-haiku-5-5",
      +  "gpt-6-astra",
      +  "gpt-6.1-sol",
      +  "gpt-6.1-terra",
      +  "gpt-6-luna",
      +  "gpt-5.6-sol",
      +  "gpt-5.3-codex",
      +  "gemini-4-argon",
      +  "gemini-3.8-flash",
      +  "gemini-3.1-pro-preview",
      +  "deepseek-flash",
      +  "deepseek-v4-pro",
      +  "grok-4.7",
      +  "grok-4.6",
      +  "grok-4.5",
      +  "grok-4.3",
      +  "grok-build-0.1"
      +]
    • removedInput schema / properties / monthly_active_users / exclusiveMinimum
      Removed value: -0
    • changedInput schema / properties / monthly_active_users / zeroNote
      Previous value: -"the web calculator replaces 0 with its default"New value: +"the web calculator clamps this to at least 1"
    • changedInput schema / properties / output_tokens_per_request / description
      Previous value: -"Web default 400."New value: +"Include thinking tokens. Web default 400."
    • removedInput schema / properties / output_tokens_per_request / exclusiveMinimum
      Removed value: -0
    • changedInput schema / properties / output_tokens_per_request / minimum
      Previous value: -1New value: +0
    • removedInput schema / properties / output_tokens_per_request / zeroNote
      Removed value: -"the web calculator replaces 0 with its default"
    • removedInput schema / properties / price_per_user_usd / exclusiveMinimum
      Removed value: -0
    • addedInput schema / properties / price_per_user_usd / minimum
      Added value: +0
    • removedInput schema / properties / price_per_user_usd / zeroNote
      Removed value: -"the web calculator replaces 0 with its default"
    • removedInput schema / properties / requests_per_user / exclusiveMinimum
      Removed value: -0
    • changedInput schema / properties / requests_per_user / zeroNote
      Previous value: -"the web calculator replaces 0 with its default"New value: +"the web calculator clamps this to at least 1"
    • addedInput schema / properties / route_model
      Added value: +{
      +  "description": "Cheaper model for routed requests. Web default claude-haiku-5-5.",
      +  "enum": [
      +    "claude-fable-5-1",
      +    "claude-opus-5-5",
      +    "claude-sonnet-5-5",
      +    "claude-haiku-5-5",
      +    "gpt-6-astra",
      +    "gpt-6.1-sol",
      +    "gpt-6.1-terra",
      +    "gpt-6-luna",
      +    "gpt-5.6-sol",
      +    "gpt-5.3-codex",
      +    "gemini-4-argon",
      +    "gemini-3.8-flash",
      +    "gemini-3.1-pro-preview",
      +    "deepseek-flash",
      +    "deepseek-v4-pro",
      +    "grok-4.7",
      +    "grok-4.6",
      +    "grok-4.5",
      +    "grok-4.3",
      +    "grok-build-0.1"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / route_share_pct
      Added value: +{
      +  "description": "Share of requests sent to the cheaper model, in percent. Web default 0.",
      +  "maximum": 100,
      +  "minimum": 0,
      +  "type": "number"
      +}
    • addedInput schema / properties / target_margin_pct
      Added value: +{
      +  "description": "Target gross margin after model costs, in percent. Web default 80.",
      +  "maximum": 99,
      +  "minimum": 0,
      +  "type": "number"
      +}
  3. Added

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already establish readOnlyHint, idempotentHint, non-destructive, and closed-world, so the safety profile is covered. The description adds genuinely useful context beyond that: pricing is at list price, model coverage is a fixed comparison set, and the math and price file mirror a specific dated web calculator, which tells an agent the results are deterministic and reproducible. Minor friction: it says '9 common models' while the schema enum exposes 20 models, leaving the comparison set ambiguous.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the estimate outputs and followed by the scope and provenance. Every clause carries information an agent can act on; there is no filler or restatement of the tool name.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, the description need not explain return values, and a full-coverage schema handles all 10 optional parameters. What remains thin is the '9 common models' comparison claim versus the 20-model enum and the absence of any statement about determinism or the price-file date, though the reference to the dated web calculator largely covers the latter.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, including per-parameter descriptions, web defaults, bounds, and zero-note clamping behavior, so the schema already carries parameter meaning. The description reinforces which quantities matter (prompt-cache share, routed share) but adds no syntax, unit, or interaction detail beyond what the schema states, so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Estimates') and enumerates the exact outputs: monthly LLM spend, cost per user and per request, prompt-cache savings, routing savings, and gross margin against a target. It also scopes the inputs ('an AI product on any current Claude, GPT, Gemini, DeepSeek or Grok model at list price'), which is enough to separate it from the adjacent calc_ai_agent_pricing_margin without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the scenario ('for an AI product'), so an agent can infer this is the right tool for modeling inference economics. However, there is no explicit when-to-use/when-not-to-use statement and no named alternative, even though calc_ai_agent_pricing_margin among the siblings is a plausible competing choice for pricing/margin questions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.