Methodology: How We Calculate

Every formula, data source, and assumption — documented transparently.

Our Calculation Philosophy

We believe a calculator is only as good as its transparency. Every tool on EcomCalcTools follows the same four-step process:

  1. Define inputs — Identify every variable a user can control.
  2. Verify sources — Pull pricing only from official provider documentation.
  3. Document formulas — Publish the exact math behind every result.
  4. Timestamp updates — Mark each calculator with a last-updated date.

Ecommerce Fee Calculations

Amazon FBA Fees

Amazon FBA costs are composed of four components: referral fees, fulfillment fees, storage fees, and optional labeling costs.

// Referral fee (% of sale price, varies by category) referral_fee = sale_price × referral_rate // Fulfillment fee (weight-based, standard size) fulfillment_fee = weight × per_lb_rate + base_fee // Monthly storage fee storage_fee = volume_cu_ft × monthly_rate // Total FBA cost per unit total_fba_cost = referral_fee + fulfillment_fee + storage_fee + labeling_cost

Amazon's standard referral fees range from 6% to 17% depending on category. Fulfillment fees are weight-based starting at $3.22 for standard size items under 1 lb.

Payment Processor Fees (Stripe / PayPal)

Payment processing costs include a percentage fee, a fixed per-transaction fee, and optional charges for currency conversion and chargebacks.

// Per-transaction processing fee transaction_fee = (sale_amount × percentage_rate) + fixed_per_tx // Currency conversion (if applicable) fx_fee = sale_amount × fx_conversion_rate // Chargeback fee (per dispute) chargeback_cost = chargeback_count × dispute_fee // Total payment processing cost total_processor_cost = transaction_fee + fx_fee + chargeback_cost

Stripe's standard rate is 2.9% + $0.30 per successful charge. PayPal's equivalent is 2.99% + $0.49. Currency conversion adds 0.5%–1% depending on the currency pair.

Platform Subscription Costs

Marketplace and platform fees include the base subscription cost, per-transaction fees, and any premium app add-ons required for the workflow.

// Monthly base subscription subscription_cost = monthly_plan_rate // Transaction-based fees transaction_fees = monthly_gmv × platform_fee_rate // App add-ons (inventory, analytics, shipping, etc.) app_cost = sum(app_monthly_fee for each addon) // Total platform cost per month total_platform_cost = subscription_cost + transaction_fees + app_cost

AI Cost Calculations

Token-Based Cost Calculations

Most LLM APIs charge separately for input tokens (prompt) and output tokens (completion), with different per-token rates for each direction.

// Cost per API call cost = (input_tokens × input_price_per_token) + (output_tokens × output_price_per_token) // All pricing is per 1M tokens, so divide by 1,000,000 cost = (input_tokens × input_per_million / 1,000,000) + (output_tokens × output_per_million / 1,000,000) // Example: 10K input + 500 output at GPT-4o mini rates ($0.15/$0.60 per 1M) cost = (10,000 × 0.15 / 1,000,000) + (500 × 0.60 / 1,000,000) = $0.00180

Token Estimation Note

Tokens do not map 1:1 to words or characters. As a rough approximation, English text averages ~4 characters per token, or ~750 words per 1M tokens. For accurate estimates, use the actual token counts returned by the API. Our calculators use OpenAI's tiktoken or equivalent tokenizers where available.

API Monthly Billing Estimates

To project monthly spend, multiply your expected request volume by the per-call cost. If you don't know your average token counts, use the default estimates we provide.

// Monthly estimate = requests × per-request cost monthly_cost = requests × [(avg_input_tokens × input_price) + (avg_output_tokens × output_price)] // Normalized per-million pricing monthly_cost = requests × [(avg_input_tokens × input_per_million / 1,000,000) + (avg_output_tokens × output_per_million / 1,000,000)] // Example: 50K requests, 500 in / 200 out at GPT-4o mini rates monthly_cost = 50,000 × [(500 × 0.15 / 1M) + (200 × 0.60 / 1M)] = $52.50/month

Cached inputs: OpenAI, Anthropic, and Google offer discounted rates for cached tokens (50% off for OpenAI, up to 90% off for Google). Our calculators use standard uncached rates by default — adjust if your use case heavily leverages caching.

Batch discounts: Google Gemini batch API offers up to 50% off standard rates. Our calculators show standard on-demand pricing unless you select the batch option.

RAG Pipeline Cost Breakdown

A Retrieval-Augmented Generation (RAG) pipeline has four cost components: document embedding, vector storage, retrieval per query, and LLM generation.

// 1. Embedding cost (one-time per document) embedding_cost = document_tokens × embedding_price_per_token // 2. Vector storage cost (monthly) storage_cost_monthly = total_vectors × storage_price_per_vector_month // 3. Retrieval cost per query retrieval_cost = query_tokens × embedding_price_per_token // 4. LLM generation cost per query llm_cost = (retrieved_context_tokens + output_tokens) × llm_price_per_token // Total per-query cost cost_per_query = retrieval_cost + llm_cost // Monthly RAG cost monthly_cost = storage_cost_monthly + (queries_per_month × cost_per_query)

A typical RAG query with Gemini 3 Flash-Lite as the LLM costs approximately $0.00033 per query ($0.000048 retrieval + $0.000282 generation). Scale that to 100,000 queries/month = ~$33/month.

AI Agent ROI Calculation

AI agent ROI is calculated as the net benefit of automation: gross labor savings minus API costs, adjusted for error rates and human review overhead.

// Annual labor cost savings labor_savings = hours_saved_per_month × hourly_rate × 12 // Annual API costs annual_api_cost = monthly_api_cost × 12 // Human review overhead (% of tasks requiring manual review) review_overhead = review_rate × hours_saved_per_month × hourly_rate × 12 // Net annual benefit net_benefit = labor_savings annual_api_cost review_overhead // ROI percentage roi = (net_benefit / annual_api_cost) × 100 // Break-even months (time to recover implementation cost) break_even_months = implementation_cost / monthly_net_benefit

We apply conservative estimates: default human review rate of 10%, failure rate of 5%, and a 15% overhead for tooling and infrastructure. These can all be adjusted in the calculator.

Formula Notation Reference

Calculator Type Quick Reference

Calculator Type Core Formula
Token Costtokens × price_per_million / 1,000,000
Monthly APIrequests × avg_cost_per_request
RAG Per-Queryembedding + storage/queries + retrieval + generation
Agent ROI(labor_savings − api_cost − review_overhead) / api_cost × 100
FBA Feesale × referral% + weight × fulfillment_rate + storage
Payment Feesale × processing% + fixed_per_tx + chargebacks
Platform Subplan + gmv × fee% + app_addons

Data Sources

Official Provider Sources

We use the following official sources exclusively. All pricing is cross-referenced against the provider's published rates and updated within 48 hours of any change.

Update Cadence

How Often We Update Pricing

We review all pricing data on a monthly basis. Whenever a provider announces a price change on their official channels, we verify the new rates and update our calculators within 48 hours. Each calculator displays a "Last Updated" timestamp so you always know how fresh the data is.

Accuracy & Error Reporting

Something Wrong? Let Us Know

Despite our diligence, pricing can change between our last check and your reading. APIs update their rates, providers introduce new tiers, and regional pricing varies. If you spot a discrepancy between what our calculator shows and what you're being charged, we want to fix it.

To report an error: Use the "Report an Error" link on the affected calculator page, or email us directly at hello@ecomcalctools.com. We verify and correct reported discrepancies within 48 hours.

What We Exclude

Common Exclusions Per Calculator

Every calculator page lists its excluded costs. Here are the most common ones:

Ecommerce Calculators

Inbound shipping to warehouse Returns processing & refunds Advertising spend (PPC, Sponsored Products) Tax calculations & VAT Customs & duties (international) Long-term storage fees Removal order costs

AI Calculators

API retry costs (exponential backoff) Content moderation API calls Tool-use / function-calling overhead Network latency and latency SLAs Infrastructure overhead (servers, load balancers) Developer tooling and monitoring costs OAuth and authentication overhead

These exclusions are listed on each individual calculator's page. If an exclusion materially affects your estimate, you can adjust inputs or factor it in manually using the formulas documented above.

Ready to Calculate?

Now that you understand how we calculate, use any of our free tools to get your exact cost estimates.

All Calculators AI Calculators