Skip to content

Jaro Winkler similarity and why it favours the first four characters

Unified dataUpdated 2026-08-188 min read

In short

Jaro-Winkler similarity scores two strings between 0 and 1 by counting characters that match within a sliding window, halving the count of transposed pairs, then adding a bonus for agreement across up to four leading characters. The bonus makes early disagreement cost more than late disagreement.

A steward working a review queue sees two rows. Kowalski and Kowalsky, same show, two editions apart, different email addresses. The system has scored the pair at 0.95 and put it above the auto-merge line. Two rows further down sits Kowalski against Gowalski, scored 0.92, sitting in the review band.

Both pairs differ by exactly one character. The steward wants to know why one of them merged itself and the other did not, and the honest answer is that Jaro-Winkler similarity treats a disagreement in the first character as more damaging than a disagreement in the last. That behaviour is deliberate, it is usually right, and it is worth understanding before you set a threshold on top of it.

What the Jaro comparator actually counts

Jaro published the comparator in the Journal of the American Statistical Association in 1989, developed while matching the 1985 census test in Tampa, Florida. It has three moving parts.

First, a matching window. Two characters count as matching if they are the same character and sit no further apart than half the length of the longer string, minus one. For two five letter surnames the window is one position either side.

Second, a transposition count. Characters that match but arrive in a different order are transpositions, and the formula charges half a point for each transposed pair rather than a full one.

Third, the average. The score is one third of the sum of three ratios: matches divided by the length of the first string, matches divided by the length of the second, and matches minus transpositions divided by matches.

Work it on a pair that actually turns up in badge data, where somebody typed two adjacent letters in the wrong order. Dwyer against Dywer. Both are five characters, so the window is one.

Every character finds a partner: the D at the front, the W and the Y within one position of each other, the E and the R at the end. So five matches out of five. Reading the matched characters in the order they appear in each string gives D, W, Y, E, R against D, Y, W, E, R, which disagree in two positions, so there is one transposition.

The three ratios are 5 over 5, 5 over 5, and 5 minus 1 over 5. That is 1, 1 and 0.8, and their average is 2.8 divided by 3, which is 0.9333. A single swapped pair of letters has cost about seven points on a scale where 1 is identical.

Why does the prefix bonus exist?

Winkler set out the adjustment in the Proceedings of the Section on Survey Research Methods of the American Statistical Association in 1990, in a paper about string comparators inside the Fellegi-Sunter model, written while the comparator was in production use for the Post Enumeration Survey of the 1990 United States census.

The argument is about where humans make errors. People get the start of a name right and lose confidence towards the end. Somebody hearing a surname over a phone at a registration desk will usually capture the first syllable correctly and improvise the rest. A person typing their own name on a mobile handset makes more errors as the word goes on. So agreement on the first few characters is stronger evidence than agreement on later ones, and the raw Jaro score treats every position identically.

The adjustment adds a bonus proportional to the length of the shared prefix, capped at four characters, scaled by a constant. The value Winkler used for that constant is 0.1, so each shared leading character adds a tenth of whatever distance remains between the raw score and 1.

The arithmetic of the bonus, and its ceiling

Take the steward's two pairs and work both.

Kowalski against Kowalsky. Both are eight characters, so the window is three. The first seven characters match in order, and the final I and Y find no partner. Seven matches, no transpositions. The ratios are 7 over 8, 7 over 8, and 7 over 7, which is 0.875, 0.875 and 1. The average is 2.75 divided by 3, which is 0.9167.

Now the prefix. K, O, W and A agree, which is the full four characters. The bonus is 4 times 0.1 times the remaining distance, and the remaining distance is 1 minus 0.9167, which is 0.0833. So 0.4 times 0.0833 is 0.0333, and the final score is 0.95.

Kowalski against Gowalski. Again eight characters and a window of three. The leading K finds no G to match and the leading G finds no K, but the remaining seven characters all match in order. Seven matches, no transpositions, and the raw Jaro score is the same 0.9167.

The prefix is where they part. K against G means zero shared leading characters, so the bonus is zero and the final score stays at 0.9167, which is the 0.92 the steward saw on screen. Two pairs, the same raw similarity, and a difference of 0.033 that comes entirely from where the disagreement sits.

That gap is small in isolation and decisive at a threshold. With an auto-merge line at 0.94, one pair merges silently and the other waits for a human.

The cap on the prefix is not arbitrary either. With four characters and a scaling constant of 0.25, the bonus becomes 1 times the remaining distance, which pushes any score with a four character prefix to exactly 1. Anything above 0.25 produces scores greater than 1, which is why implementations hold the constant at or below a quarter and why 0.1 is the conventional setting. Implementations also apply the bonus only when the raw Jaro score already clears a floor, commonly 0.7, so that two unrelated names sharing four leading characters do not get promoted into the review band on the strength of the prefix alone.

Where the prefix bonus works against you

The whole adjustment rests on an assumption: that the first four characters of the field carry identifying information. On a forename or a surname that assumption usually holds. On other fields it collapses.

Company names are the clearest case. The Meridian Group and The Meridian Partnership share four leading characters that tell you nothing, because the shared prefix is an article. Every company name beginning with The, or with a country word, or with an initialism the person typed differently, gets the same free 0.033 or more.

Names carrying a particle behave the same way. Al Rashid, Al Sayed and Al Mansour share their first three characters. Van Dijk and Van Der Berg share four. On an international attendee list the particle is a common prefix across thousands of unrelated people, and the bonus rewards it exactly as if it were evidence.

The third case is the one that costs organisers the most. A registration form with a single name field collects Dr Anna Kowalski and Mr Anthony Kowalski, and once the title has been typed into the box, the leading characters describe the title. Strip titles before comparison, or compare the parsed forename rather than the raw field.

Cohen, Ravikumar and Fienberg compared string distance measures on name matching tasks at the IJCAI workshop on Information Integration on the Web in 2003, and their best performing method was a hybrid that put Jaro-Winkler inside a token based scheme weighted by term frequency. The lesson event data confirms is that the character comparator belongs on the token, and something else belongs on the field made of several tokens. The general version of that argument, one measure per field, is J16's subject.

What score should you merge on?

Not the raw number, and this is where most implementations go wrong.

A continuous similarity is useful evidence and a poor decision rule, because 0.95 on a four letter surname and 0.95 on a twelve letter surname are not the same quality of evidence. The four letter case has far fewer ways to be right by accident. Band the score instead: treat agreement above 0.94 as one level, 0.85 to 0.94 as a second, below that as disagreement, and estimate how often each level occurs among true matches and among random pairs from your own file.

Those banded frequencies become weights, and the weights sum into the pairwise score that carries an actual decision. That is the model described in cross event attendee matching, and the reason to feed it bands rather than raw similarities is that the bands are the part you can estimate from your data with any confidence.

Where this stops

Jaro-Winkler measures typing. It knows nothing about names.

Robert against Bob scores exactly 0.50: two matching characters, one transposition, and no prefix agreement at all. Margaret against Peggy scores about 0.44, because only the G falls inside the matching window. Both pairs are the same person often enough to matter, and no threshold on a character comparator will separate them from genuine non-matches, because the strings really are unrelated. Nickname handling needs a lookup table, and that table is a data asset you build once and maintain. No library ships one that covers your exhibitor base, so somebody owns the file and adds a pairing every time registration turns one up.

The second limit is script. The comparator operates on characters, so it works on strings that have already been reduced to one alphabet and one case. Muller and Müller and Mueller score badly against each other until transliteration has run, and by the time transliteration has run the comparator gets an easy problem. Most of the accuracy in international name matching comes from the normalisation step ahead of the comparator, which is the sequencing point argued in J14 on edit distance as well.

The third is short strings. Chan against Chen has three matching characters out of four, a raw score of 0.8333, and a two character prefix, which lifts it to about 0.87. Wojciechowski against Wojciechowsky differs by exactly one character too, and lands at about 0.97. Same edit, ten points of difference, and the reason is length. A threshold that is correct for long surnames is too loose for short ones, and a length aware threshold is worth the hour it takes to implement.

Take twenty pairs out of your current review queue this week, work the Jaro number by hand on the surname for five of them, and compare it against what the unified data pipeline recorded. You are checking two things: that the implementation you are running matches the definition you think it does, and that the pairs sitting at your threshold are the ones a person would actually hesitate over.

Questions people ask about jaro winkler similarity

How is Jaro-Winkler similarity calculated?
Count the characters that appear in both strings within a window of half the longer string minus one. Average three ratios: matches over the first length, matches over the second length, and matches minus half the transposed pairs over matches. Then add a prefix bonus of 0.1 for each of up to four leading characters that agree.
Why does Jaro-Winkler favour the start of a name?
Winkler added the prefix adjustment in 1990 on the argument that people make fewer errors at the beginning of a name than at the end. Two surnames differing in their last character keep the full four character prefix bonus, while two differing in their first character receive nothing, even when the underlying Jaro score is identical.
When should you not use Jaro-Winkler?
Avoid it on fields whose leading characters carry no identifying information. Company names starting with an article, personal names carrying a particle such as van or al, and any field where a title has been typed into the name box all get a bonus for agreement that means nothing. A token based measure suits those fields better.

Related reading

All identity resolution articles