Customer lifetime value calculator
A customer who spends 80 per order, buys 4 times a year at a 40% margin and stays 3 years is worth 384 in gross profit. Enter order value, frequency, margin and lifespan to get the lifetime value. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Avg purchase value
- 80
- Purchase frequency
- 4
- Gross margin
- 40
- Customer lifespan
- 3
- Gross margin decimal
- 0.4
- Customer value per period
- 320
- Contribution per period
- 128
- Total purchases
- 12
Customer lifetime value answers a simple but high-stakes question: how much gross profit is one average customer expected to contribute over the whole relationship? This customer lifetime value calculator multiplies average purchase value by purchase frequency, scales by gross margin as a percent, and multiplies by customer lifespan so you get a single currency figure for budgeting acquisition spend, comparing segments, and teaching the classic historic CLV model. It is the retail and e-commerce form of the metric—not the subscription formula that divides contribution by monthly churn—so frequency and lifespan must share the same period unit, usually years.
What historic customer lifetime value means and how the formula works
Historic customer lifetime value, often written CLV or CLTV, estimates the total gross profit an average customer is expected to generate from first purchase through the end of the active relationship. The simple textbook model decomposes that total into four levers you can measure from sales data: average purchase value (also called average order value), how often the customer buys in a chosen period, the gross margin percent that remains after cost of goods, and how many periods the typical relationship lasts.
Algebraically, customer value per period equals average purchase value times purchase frequency; contribution per period equals that customer value times gross margin divided by one hundred; and lifetime value equals contribution per period times customer lifespan. Frequency and lifespan must use the same clock: if frequency is purchases per year, lifespan is years; if you count purchases per month, lifespan must be months. Mixing units silently overstates or understates CLV.
Gross margin is a percent from zero through one hundred, not a decimal ratio, so forty means forty percent contribution after variable product cost. Zero margin yields zero CLV even when revenue is large, which correctly reflects a business that sells at cost. Zero frequency or zero lifespan also yields zero CLV, representing no repeat activity or no relationship length.
This model does not discount future cash flows, does not model churn as a monthly rate, and does not allocate fixed overhead—it is a transparent contribution estimate for planning and teaching, not a full discounted cash-flow valuation of a customer cohort.
Where a customer lifetime value calculator earns its keep
E-commerce operators and retail planners use a customer lifetime value calculator when they know average order value, yearly purchase cadence, category margin, and typical relationship length from CRM or POS exports and need a single profit figure for budgeting paid acquisition. Marketing teams compare segments—high AOV low frequency versus low AOV high frequency—by holding margin and lifespan constant and reading which profile produces more CLV under the same historic model.
Educators and LMS platforms need a deterministic oracle for marketing-math homework that asks students to compute simple CLV from the four levers, including the zero-margin and zero-frequency edge cases students often mishandle. Failed validation does not consume balance. Keep frequency and lifespan on the same period unit, pin the rounded clv and intermediate fields in tests, and you get reproducible lifetime values for spreadsheets, n8n flows, and edge workers without standing up a CRM analytics stack of your own.
When your business is pure subscription with monthly churn, use a churn-based LTV tool instead; this calculator is the historic product model for purchase-based relationships.
What you can do with it
Acquisition budget from historic CLV
Turn average order value, yearly purchase cadence, gross margin, and relationship length into a contribution CLV so paid media caps stay under expected lifetime profit.
Segment comparison for retail and e-commerce
Compare high-AOV infrequent buyers with low-AOV frequent buyers under the same margin and lifespan assumptions without building a full cohort model.
Classroom and marketing-math checks
Mark homework that asks for simple customer lifetime value from the four classic levers with a deterministic product formula.
FAQ
How do you calculate customer lifetime value from AOV, frequency, margin, and lifespan?
Frequency and lifespan must share the same period unit (usually years).
How is this different from subscription LTV with churn?
This is the historic product model for purchase-based businesses. Subscription LTV typically divides monthly contribution by monthly churn rate and does not take purchase frequency and lifespan as separate inputs.
Why must purchase frequency and lifespan use the same period?
Because the calculation multiplies them together. Purchases per year go with a lifespan in years, purchases per month with a lifespan in months; mixing the two silently inflates or shrinks the result.
Do I enter gross margin as 40 or as a decimal?
As a percentage from 0 to 100, so 40 means 40%. A margin of zero gives a lifetime value of zero even when revenue is large, which correctly reflects selling at cost.
Does the calculator discount future profits?
No. It does not discount future cash flows, model churn as a monthly rate or spread fixed overhead. It gives a transparent profit estimate for planning and teaching, not a full valuation of a customer group.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/finance/customer-lifetime-value \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"avg_purchase_value":80,"purchase_frequency":4,"gross_margin":40,"customer_lifespan":3}'const res = await fetch("https://api.kit.forhosting.com/finance/customer-lifetime-value", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"avg_purchase_value": 80,
"purchase_frequency": 4,
"gross_margin": 40,
"customer_lifespan": 3
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/finance/customer-lifetime-value",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"avg_purchase_value": 80,
"purchase_frequency": 4,
"gross_margin": 40,
"customer_lifespan": 3
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/finance/customer-lifetime-value", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"avg_purchase_value":80,"purchase_frequency":4,"gross_margin":40,"customer_lifespan":3}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"avg_purchase_value":80,"purchase_frequency":4,"gross_margin":40,"customer_lifespan":3}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/finance/customer-lifetime-value", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"avg_purchase_value": 80,
"purchase_frequency": 4,
"gross_margin": 40,
"customer_lifespan": 3
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "finance.customer_lifetime_value",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
Invalid input fails with invalid_input and is not billed.
What historic customer lifetime value means and how the formula works
Expanding the product gives the single product form clv equals avg_purchase_value times purchase_frequency times (gross_margin over one hundred) times customer_lifespan.
Input contract, rounding, validation, and worked examples
Average purchase value is currency units per order and must be greater than or equal to zero. Purchase frequency is the average number of purchases per period and must be non-negative. Customer lifespan is the average relationship length in the same period unit as frequency and must be non-negative. Example: average purchase value eighty, purchase frequency four per year, gross margin forty percent, lifespan three years yields customer value per year three hundred twenty, contribution per year one hundred twenty-eight, twelve purchases over the life, nine hundred sixty total revenue, and CLV three hundred eighty-four currency units. Example: average purchase value one hundred, frequency two, margin fifty, lifespan five yields five hundred units of lifetime contribution. POST a JSON body with four required finite numbers: avg_purchase_value, purchase_frequency, gross_margin, and customer_lifespan. Gross margin is a percent between zero and one hundred inclusive; values outside that range fail with invalid_input. An optional decimals integer from zero through twelve (default six) controls half-up rounding applied once to monetary and intermediate fields from the raw IEEE values. Missing fields, empty strings, non-finite values, negative levers, and margins outside zero through one hundred fail with invalid_input naming the issue, and those failures are not billed. On success the body echoes the four inputs, returns gross_margin_decimal as the 0–1 ratio, customer_value_per_period as average revenue per period before margin, contribution_per_period after margin, total_purchases over the lifespan, total_revenue before margin, the final clv figure, and a formula string restating the product identity. Pair the response with your own acquisition cost only if you want a payback check; this endpoint does not compute CAC, retention curves, or discounted CLV from a cash-flow schedule.
Technical questions
Is gross_margin a percent or a decimal?
A percent from 0 to 100 inclusive. Example: 40 means 40% contribution after cost of goods. The API also returns gross_margin_decimal as the 0–1 ratio.
What period unit should purchase_frequency and customer_lifespan use?
The same unit for both. If frequency is purchases per year, lifespan is years. Mixing months and years silently misstates CLV.
What does the customer lifetime value calculator cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.