E-commerce Calculators: The Formulas Behind Every Store Metric

Metricuno
November 1, 2026
5 min read
E-commerce Calculators: The Formulas Behind Every Store Metric — Every core e-commerce calculation in one place: revenue per visitor, CAC, LTV, ROAS, AOV, conversion rate, margin, payback period, revenue forecasts, plus sample size and statistical significance for A/B tests.
Quick answer

The formulas behind the numbers you make decisions with: what a visitor, a customer and an order are worth, what they cost, and how long it takes to earn the cost back, plus the two calculations every A/B test needs.

Definition
Tools

E-commerce calculators

E-commerce calculators turn raw store data (visitors, orders, revenue, costs) into the metrics used for decisions, such as revenue per visitor, acquisition cost, lifetime value and return on ad spend.

Most store metrics are simple ratios, but small definition choices change the answer: sessions or visitors, revenue before or after refunds, gross or contribution margin. A calculator is only as useful as the definitions behind it. This guide gives each formula, the definition choices that matter, and what to compare the result with.

Also known as
Ecommerce formulas
Store metric calculators

Each calculation below links to a more detailed guide. Two of them, sample size and statistical significance, are interactive tools: the free A/B test calculator plans how long a test needs and analyses the result, all in your browser.

One rule applies to all of them: use the same period, the same definitions and, where possible, the same data source for every input. A ratio of revenue from your shop platform to visitors from a separate analytics tool will be off by whatever the two disagree on.

RPV calculator: revenue per visitor

Revenue per visitor = revenue ÷ visitors, which equals conversion rate × average order value. It's the best single number for the value of traffic: if RPV is €2.40, a visitor is worth €2.40 on average, so a click costing €3 loses money before any other cost. Calculate it by device and channel, and use it to estimate the yearly effect of a test: RPV lift × yearly visitors.

CAC calculator: customer acquisition cost

Customer acquisition cost = acquisition spend ÷ new customers, for the same period. Decide what spend includes: media only, or media plus agency fees, tools, creative and first-order discounts (fully loaded CAC). Count only first-time customers. Calculate blended CAC across all channels and paid CAC for paid channels, because they answer different questions.

LTV calculator: customer lifetime value

A simple lifetime value = average order value × orders per customer per year × expected years as a customer × gross margin. A more reliable version uses cohorts: take customers who first bought in a given month and add up the margin they've produced after 3, 6 and 12 months. Use margin rather than revenue, and compare LTV with CAC by channel, not just overall.

ROAS calculator: return on ad spend

Return on ad spend = attributed revenue ÷ ad spend. The number to compare it with is break-even ROAS = 1 ÷ contribution margin (as a fraction). With a 40% contribution margin, break-even ROAS is 2.5: below that, ads lose money on the first order. Whether a lower ROAS is acceptable depends on repeat purchases, which is where LTV comes in.

Sample size calculator for A/B tests

Before an A/B test, work out how many visitors each variant needs to detect the smallest effect you care about. The inputs are your baseline conversion rate, the minimum detectable effect, the significance level and statistical power. Smaller effects and lower baselines need far more traffic. Divide the total by weekly traffic to see how many weeks the test needs, and run full weeks.

AOV calculator: average order value

Average order value = revenue ÷ orders. Decide whether revenue includes shipping, taxes and refunds, and use the same choice every time. Check the median alongside the mean, because a few large orders can move the average a lot. To set a free-shipping threshold, look at the distribution of order values, not just the average.

Revenue forecast calculator

A driver-based revenue forecast = expected visitors × conversion rate × average order value, calculated per channel and month, plus expected revenue from returning customers. Use last year's seasonality to shape the months, and calculate a low, base and high case by varying the inputs you're least sure of. The spread between the cases matters as much as the base number.

Payback period calculator

Payback period = CAC ÷ contribution per customer per month. It tells you how many months it takes for a new customer to earn back what they cost. A store with a CAC of €40 and €10 of monthly contribution per customer pays back in four months. Shorter payback means growth needs less cash; it's often a more practical constraint than the LTV-to-CAC ratio.

Margin calculator: gross and contribution margin

Gross margin = (revenue − cost of goods sold) ÷ revenue. Contribution margin = (revenue − all variable costs) ÷ revenue, where variable costs include cost of goods, shipping, payment fees, packaging, returns and the marketing spent per order. Contribution margin is the one to use for break-even ROAS, discount decisions and free-shipping thresholds.

Statistical significance calculator

After an A/B test, a significance calculation tells you how likely a difference this large would be if the variants actually performed the same. Enter visitors and conversions for each variant to get the p-value, the confidence interval for the lift and, in a Bayesian view, the probability that the variant is better. Only judge a test once it reaches its planned sample size, and check for sample ratio mismatch first.

Conversion rate calculator

Conversion rate = conversions ÷ visitors (or sessions) × 100. The denominator matters: session-based rates are lower than visitor-based rates because one visitor can have several sessions. Pick one, note it, and use it for every comparison. Calculate conversion by device, channel and landing page, because the sitewide number mixes groups that behave very differently.

Putting the calculations together

These formulas form one model of the store. Visitors × conversion rate × AOV = revenue; revenue × contribution margin = contribution; contribution per customer over time = LTV; LTV against CAC and payback period tells you how much you can spend to grow. Change one input, such as a conversion improvement from a winning test, and you can follow its effect all the way to profit.

That's also how to size test ideas before running them: estimate the lift, multiply through revenue per visitor and yearly traffic, and compare with the effort. Then plan the sample size so the test can actually detect that lift.

Frequently asked

E-commerce calculators: frequently asked questions

Divide revenue by visitors for the same period. It equals conversion rate multiplied by average order value.

It depends on margin, cash and payback period. Calculate LTV with margin rather than revenue, compare by channel, and check how many months it takes to earn back CAC.

Divide 1 by your contribution margin as a fraction. With a 25% contribution margin, break-even ROAS is 4.

It depends on your baseline conversion rate and the smallest lift you want to detect. Use a sample size calculator before starting, and run the test in full weeks until it reaches that number.

Test ideas before you ship them

Run unlimited A/B tests, attach hypotheses to outcomes, and build a searchable archive of what works — and what doesn't.