Simple Matching Coefficient Calculator
Inputs
- Inputs: both present 18, only in the first 4, only in the second 6, absent from both 12 - 40 attributes in all.
- The simple matching coefficient counts agreements of both kinds: (18 + 12) / 40 = 0.7500. Shared absences count as matches, which is the coefficient's defining choice.
- Jaccard drops the shared absences and reads 0.6429 on the same counts - the gap between the two numbers is exactly the weight the absent-from-both attributes carry.
- Simple matching coefficient: 0.7500, with a mismatch rate of 0.2500 across the 40 attributes.
How similar are two binary profiles - two species lists, two symptom patterns, two feature vectors? The simple matching coefficient gives the most democratic answer: it counts agreements of both kinds, attributes present in both profiles and attributes absent from both, and divides by all attributes compared. Enter the four counts and the calculator returns the coefficient with the Jaccard alternative alongside.
The pairing of the two measures is deliberate. Whether shared absence should count as similarity is a modelling decision, and showing both numbers makes the size of that decision visible on your own data.
Worked examples
Agreements of both kinds dominate
(18 · 4 · 6 · 12)
| Simple matching coefficient | 0.7500 |
| Jaccard coefficient | 0.6429 |
| Mismatch rate | 0.2500 |
| Attributes compared | 40 |
Close pair, few mismatches
(25 · 2 · 3 · 5)
| Simple matching coefficient | 0.8571 |
| Jaccard coefficient | 0.8333 |
| Mismatch rate | 0.1429 |
| Attributes compared | 35 |
Sparse profiles, mostly mismatch
(8 · 9 · 11 · 2)
| Simple matching coefficient | 0.3333 |
| Jaccard coefficient | 0.2857 |
| Mismatch rate | 0.6667 |
| Attributes compared | 30 |
Counting agreements of both kinds
The first worked example compares two profiles across 40 attributes: 18 shared presences, mismatches of 4 and 6 in the two directions, and 12 shared absences. Agreements total 30 of 40, so the coefficient is 0.7500, and the mismatch rate is 0.2500.
The shared absences are doing real work in that number. The Jaccard coefficient, which counts only shared presences against all attributes present in either profile, reads 0.6429 on the same counts. The gap between 0.7500 and 0.6429 is exactly the value the absences contribute.
The second example is a closer pair: 25 shared presences and 5 shared absences against only 5 mismatches give 0.8571, with Jaccard close behind at 0.8333 - when absences are few, the two measures converge.
- SMC = (shared presences + shared absences) / all attributes compared.
- Jaccard excludes shared absences from both numerator and denominator.
- The mismatch rate is 1 minus the SMC.
SMC against Jaccard and Dice
The sparse third example shows why the choice matters. With only 8 shared presences, 20 mismatches and 2 shared absences across 30 attributes, SMC reads 0.3333 while Jaccard reads 0.2857. Both say 'dissimilar', but in datasets where absences dominate - long checklists where most entries are zero for everyone - SMC inflates toward 1 for almost every pair, and Jaccard becomes the informative measure.
Dice's coefficient is Jaccard's close cousin, double-weighting shared presences; it always sits between Jaccard and 1 on the same data. The three measures rarely disagree about ranking pairs by similarity, but they disagree substantially about the absolute level, which matters when a threshold decides a match.
In numerical taxonomy, where Sokal and Sneath developed these coefficients for classifying organisms by trait lists, SMC was the default because a shared absence of a trait was genuine biological information. In text and market-basket data, absence usually means 'not observed', and Jaccard's scepticism fits better.
| Example | SMC | Jaccard | Mismatch rate | Attributes |
|---|---|---|---|---|
| First | 0.7500 | 0.6429 | 0.2500 | 40 |
| Second | 0.8571 | 0.8333 | 0.1429 | 35 |
| Third | 0.3333 | 0.2857 | 0.6667 | 30 |
Worked examples
Example 1: Present in both (a) 18; Only in the first (b) 4; Only in the second (c) 6; Absent from both (d) 12. Simple matching coefficient = 0.7500. Supporting values: Jaccard coefficient 0.6429; Mismatch rate 0.2500; Attributes compared 40. Inputs: both present 18, only in the first 4, only in the second 6, absent from both 12 - 40 attributes in all. The simple matching coefficient counts agreements of both kinds: (18 + 12) / 40 = 0.7500. Shared absences count as matches, which is the coefficient's defining choice. Jaccard drops the shared absences and reads 0.6429 on the same counts - the gap between the two numbers is exactly the weight the absent-from-both attributes carry. Simple matching coefficient: 0.7500, with a mismatch rate of 0.2500 across the 40 attributes.
Example 2: Present in both (a) 25; Only in the first (b) 2; Only in the second (c) 3; Absent from both (d) 5. Simple matching coefficient = 0.8571. Supporting values: Jaccard coefficient 0.8333; Mismatch rate 0.1429; Attributes compared 35. Inputs: both present 25, only in the first 2, only in the second 3, absent from both 5 - 35 attributes in all. The simple matching coefficient counts agreements of both kinds: (25 + 5) / 35 = 0.8571. Shared absences count as matches, which is the coefficient's defining choice. Jaccard drops the shared absences and reads 0.8333 on the same counts - the gap between the two numbers is exactly the weight the absent-from-both attributes carry. Simple matching coefficient: 0.8571, with a mismatch rate of 0.1429 across the 35 attributes.
Example 3: Present in both (a) 8; Only in the first (b) 9; Only in the second (c) 11; Absent from both (d) 2. Simple matching coefficient = 0.3333. Supporting values: Jaccard coefficient 0.2857; Mismatch rate 0.6667; Attributes compared 30. Inputs: both present 8, only in the first 9, only in the second 11, absent from both 2 - 30 attributes in all. The simple matching coefficient counts agreements of both kinds: (8 + 2) / 30 = 0.3333. Shared absences count as matches, which is the coefficient's defining choice. Jaccard drops the shared absences and reads 0.2857 on the same counts - the gap between the two numbers is exactly the weight the absent-from-both attributes carry. Simple matching coefficient: 0.3333, with a mismatch rate of 0.6667 across the 30 attributes.
The shared-absence question
Ask what a zero means in your data. If the attribute list is a fixed instrument - the same 40 diagnostic traits assessed for every specimen - then a shared absence was measured, and counting it is honest. If the list is open-ended, like the set of all products a customer might buy, absence mostly means the question never arose.
A practical test: if you doubled the attribute list with traits neither profile has, would you want the similarity to change? SMC would rise toward 1; Jaccard would not move. Your answer to that thought experiment is your choice of measure.
Binary profiles in ecology and genetics
Species-by-site matrices are the ancestral use case: two sites are similar if they share species and share absences of the regional pool's other species. Genetic fingerprinting uses the same logic on marker bands. In both fields the attribute list is a defined instrument, which is why SMC remains common there long after information retrieval abandoned it.
Medical symptom profiles sit in between: a standardised assessment makes absences meaningful, a free-text record does not. The data-collection instrument, not the field, decides.
Entering the four counts
Count each attribute once, in exactly one of the four cells: present in both, present only in the first, present only in the second, absent from both. The four counts must sum to the number of attributes compared - 40, 35 and 30 in the worked examples - which is a quick self-check before reading the result.
If you are starting from raw profiles rather than counts, tally the cells attribute by attribute; software that reports a confusion matrix between the two binary vectors is reporting exactly these four numbers under another name.
The coefficient has a second life in classification, where the same four counts appear as the confusion matrix of a binary classifier read against truth: shared presences are true positives, shared absences true negatives, and the two mismatch cells are the two error types. The simple matching coefficient is then exactly the classifier's accuracy. That identity is a warning as much as a curiosity - accuracy is a notoriously flattering metric when one class dominates, for the same reason SMC flatters similarity when absences dominate. The third example, at 0.3333, is what an honest low score looks like when the profiles genuinely diverge.
Weighted variants exist for cases where the four cells should not count equally: presences can be weighted above absences without going all the way to Jaccard, and individual attributes can carry importance weights of their own. Each weighting is a claim about the data's meaning, and the unweighted coefficient remains the reference point the claims are measured against - which is why it is still worth computing first, before deciding it needs help.
The four counts also expose an asymmetry the headline number hides: the two mismatch cells need not be equal, and their balance is diagnostic. In the first example the mismatches split 4 against 6 - nearly even, suggesting symmetric noise between the profiles. A lopsided split, where one profile has almost everything the other has and more, describes nesting rather than divergence, and the right response is a different model of the relationship, not a similarity score at all. Read the cells before the coefficient; the coefficient is their summary, not their replacement.
In short: tally the four cells honestly, check that they sum to the number of attributes compared, and then read the coefficient beside its Jaccard counterpart - agreeing when absences are scarce or meaningful, diverging exactly by the value your data places on a shared absence.
FAQs
What coefficient does the first example give?
The first example gives a simple matching coefficient of 0.7500: 30 agreements (18 shared presences and 12 shared absences) out of 40 attributes compared.
What Jaccard coefficient does the first example give?
The Jaccard coefficient is 0.6429 in the first example. It ignores the 12 shared absences, so it reports the same profiles as less similar than the matching coefficient does.
What mismatch rate does the first example give?
The mismatch rate is 0.2500 in the first example - the 10 attributes where the profiles disagree, as a share of all 40 compared. It is 1 minus the matching coefficient.
What coefficient does the second example give?
The second example gives 0.8571, the highest of the three: 30 agreements out of 35 attributes, with only 5 mismatches between the profiles.
What coefficient does the sparse third example give?
The sparse third example gives 0.3333. With only 8 shared presences and 2 shared absences against 20 mismatches, the profiles agree on just a third of the attributes.
What mismatch rate does the third example give?
The third example's mismatch rate is 0.6667 - two-thirds of the 30 attributes differ between the profiles, which is why both similarity measures read low.