Tabellab
Data, tech, science & health

Support, confidence and lift explained, with an Excel example

Support, confidence and lift are the three numbers behind every association rule such as "customers who buy bread also buy butter". Support says how common an item set is, confidence how often B is in the basket when A is, and lift whether that happens more often than chance. In the 16 grocery baskets below, Bread → Butter has a confidence of only 50.0% but a lift of 1.33, a real link. Bread → Milk looks stronger at 70.0% confidence, yet its lift is 0.93: milk is simply in most baskets anyway.

Updated 21 Oct 2026 5 min read By Tabellab team

The three formulas

With N baskets, n(A) baskets containing A and n(A and B) baskets containing both:

  • Support(A) = n(A) ÷ N and Support(A, B) = n(A and B) ÷ N
  • Confidence(A → B) = n(A and B) ÷ n(A), the probability of B given A
  • Lift(A → B) = Confidence(A → B) ÷ Support(B) = Support(A, B) ÷ (Support(A) × Support(B))

Support and lift are symmetric: A → B and B → A have the same values. Confidence is not, because it divides by the baskets of the item on the left.

Step 1: baskets as 0/1 rows and item support

Put one basket per row and one item per column, with 1 if the item is in the basket and 0 if not. Then counting is adding: =SUM(B2:B17) gives the 10 baskets with bread, and dividing by the 16 baskets gives a support of 62.5%. Butter is in 37.5% of the baskets, milk in 75.0% and coffee in 31.3%. Support is a share of baskets, not of items sold, so always divide by the number of baskets.

Step 2: count pairs with SUMPRODUCT

A basket contains both items when both cells are 1, so their product is 1. =SUMPRODUCT(B2:B17,C2:C17) counts the 5 baskets with bread and butter, a pair support of 5 ÷ 16 = 31.3%. The same formula on bread and milk gives 7, and on milk and coffee 3. For many items, fill a whole co-occurrence matrix with this formula, as the pair support lab does.

Worked example: 16 baskets, three rules

Rows 2 to 17 are the baskets of a fictional grocery store, 1 = item in the basket. Rows 18 to 30 calculate support, confidence and lift.

Worked example: 16 baskets, three rules
ABCDE
1BasketBreadButterMilkCoffee
2#11110
3#21100
4#31010
5#40011
6#51110
7#61001
8#70010
9#81110
10#91011
11#100110
12#111010
13#120011
14#131100
15#140001
16#151010
17#160010
18Baskets with item106125
19Support (share of baskets)62.5%37.5%75.0%31.3%
20Rule metricValue
21Baskets with Bread and Butter5
22Support {Bread, Butter}31.3%
23Confidence Bread → Butter50.0%
24Confidence Butter → Bread83.3%
25Lift Bread ↔ Butter1.33
26Baskets with Bread and Milk7
27Confidence Bread → Milk70.0%
28Lift Bread ↔ Milk0.93
29Baskets with Milk and Coffee3
30Lift Milk ↔ Coffee0.80
Key formulas
  • B19=B18/COUNT($B$2:$B$17)Support of an item
  • B21=SUMPRODUCT(B2:B17,C2:C17)Baskets with both items
  • B23=B21/B18Confidence Bread → Butter
  • B25=B23/C19Lift = confidence ÷ support of B
  • B28=B27/D19Lift below 1 despite 70% confidence

Illustrative data. A real analysis uses thousands of baskets and minimum support and confidence thresholds.

Step 3: confidence in both directions

Confidence of Bread → Butter is 5 ÷ 10 = 50.0%: half of the bread buyers also take butter. Confidence of Butter → Bread is 5 ÷ 6 = 83.3%: butter buyers nearly always take bread. Same pair, two different rules. If you want to suggest butter at the bread shelf, the first number is the relevant one.

Step 4: lift, the check against chance

Confidence alone flatters popular items. Bread → Milk has a confidence of 70.0%, which sounds like a strong rule, but 75.0% of all baskets contain milk. The lift is 70.0% ÷ 75.0% = 0.93: bread buyers take milk slightly less often than shoppers in general. Bread → Butter has a lower confidence, 50.0%, but butter is only in 37.5% of baskets, so the lift is 50.0% ÷ 37.5% = 1.33. Knowing that a basket contains bread makes butter a third more likely.

  • Lift above 1: the items go together more often than chance, candidates for cross-selling, bundles and joint displays.
  • Lift around 1: no relationship, however high the confidence.
  • Lift below 1: the items appear together less often than chance, often substitutes. Milk and coffee here have a lift of 0.80.

Thresholds, sample size and what to do with a rule

Real analyses first drop rules below a minimum support, so rare pairs do not produce huge but meaningless lifts, then a minimum confidence, and rank what is left by lift. With 16 baskets every number here is fragile: one basket more or less changes the lift visibly. On real data, check that a rule rests on enough baskets, and compare it with a simple test of independence such as the chi-square test in Excel. Lift is a ratio like the relative risk in our odds ratio guide, and it says nothing about volume or margin, so value a rule by the extra sales it can bring before acting on it.

Common mistakes

  • Ranking rules by confidence alone. Rules ending in a very popular item always look strong. Check the lift before you act.
  • Dividing by items instead of baskets. Support is the share of baskets. Dividing by the total of all 1s understates it.
  • Treating confidence as symmetric. Bread → Butter (50.0%) and Butter → Bread (83.3%) are different rules. Divide by the baskets of the left-hand item.
  • Trusting a big lift on a tiny support. Two rare items bought together twice can show a lift of 5 or more. Set a minimum support first.
  • Reading lift as causation. A lift above 1 shows that items are bought together, not that one causes the other. Both may follow a third factor, such as a weekend shop.
  • Counting quantities instead of presence. Three loaves in one basket still count as one basket with bread. Convert quantities to 0/1 first.

Frequently asked questions

What is the difference between support and confidence?

Support is the share of all baskets that contain an item or item set. Confidence is conditional: of the baskets that contain A, the share that also contain B. Support measures how common, confidence how reliable a rule is.

What does a lift of 1 mean?

A lift of 1 means the items are independent: knowing that a basket contains A does not change the chance that it contains B. Above 1 they go together, below 1 they tend to exclude each other.

What is a good lift value?

There is no universal cut-off. Many analysts look at rules with a lift clearly above 1, for example 1.2 or more, that also pass minimum support and confidence. What matters in the end is the extra margin a recommendation produces.

Can I do market basket analysis in Excel?

Yes, for a moderate number of items. Put baskets in 0/1 rows, count items with SUM and pairs with SUMPRODUCT, then calculate support, confidence and lift with simple divisions. For thousands of items, use the Apriori algorithm in Python or R.

Practise it in a lab

Related guides

Reading is step one. Doing is step two.

Every guide links to a lab where you build the same calculation in an online spreadsheet and get instant feedback.

Open the lab