Model Cost Comparison

Compare costs between AWS Bedrock and Self-Hosting on SageMaker

Bedrock Pricing

per 1K tokens
per 1K tokens
%
Percentage of tokens served from cache (cheaper rates)
per 1K tokens
per 1K tokens

↗ View official Bedrock pricing

Self-Hosting (SageMaker)

tokens/sec
per hour

Token Volume

The comparison will show scaling at 100%, 110%, 150%, 200%, and 300% of your specified token volumes.

tokens
tokens

How We Calculate Costs

This tool compares two pricing models by calculating costs across different token volumes. Here's the math behind each calculation:

🔷 Bedrock Pricing Formula

Total Cost = Input Cost + Output Cost
Input Cost = (Token Volume ÷ 1000) × Input Token Price
Output Cost = (Token Volume ÷ 1000) × Output Token Price
Example: For 100K tokens with $0.00007 input and $0.0003 output pricing:
Input Cost = (100,000 ÷ 1000) × $0.00007 = $0.007
Output Cost = (100,000 ÷ 1000) × $0.0003 = $0.030
Total = $0.037

🔶 Self-Hosting Formula

Total Cost = Processing Time × Hourly Instance Cost
Processing Time (hours) = Max(Input, Output) Tokens ÷ (Throughput × 3600) Note: Throughput applies to both input and output simultaneously; 3600 converts seconds to hours
Total Cost = Processing Time × Instance Hourly Cost
Example: For 100K tokens each with 787 tokens/sec throughput and $5.672/hour:
Processing Tokens = Max(100,000, 100,000) = 100,000
Processing Time = 100,000 ÷ (787 × 3600) = 0.035 hours
Total Cost = 0.035 × $5.672 = $0.20

📝 Key Assumptions

  • Token Volume: You specify separate input and output token counts, and the comparison scales at 100%, 110%, 150%, 200%, and 300%
  • Throughput: Rate applies to both input and output processing simultaneously (e.g., 1500 tokens/sec means 1500 input AND 1500 output tokens per second)
  • Instance Costs: Based on AWS EC2 on-demand pricing for SageMaker instances
  • No Setup Costs: Self-hosting calculation excludes model loading and instance startup time