Serendipity has an exact birthday. Horace Walpole invented it on 28 January 1754, in a letter to his friend Horace Mann, and he explained exactly what he meant.

Walpole had just made a small discovery about Venetian heraldry. Checking an old book, he had linked two families through their coats of arms. He called it a find of the kind he named serendipity, "a very expressive word." He took it from a "silly fairy tale," The Three Princes of Serendip. Its heroes, he wrote, "were always making discoveries, by accidents and sagacity, of things which they were not in quest of."

Walpole was strict about the definition. "No discovery of a thing you are looking for," he added, counts. Accident alone was not enough either: the princes also needed sagacity to notice what they had found.

The tale had a long route to Walpole. Word Histories traces it to a 1557 Venetian book by Cristoforo Armeno, which was inspired by a work of the poet Amir Khosrau. It reached English in 1722 through a French version. Serendip itself is an old name for Sri Lanka. Wikipedia calls it Persian, with Arab traders saying Sarandib, while Word Histories gives the Arabic as the source. Both trace it to Sanskrit, though they gloss it differently: "Isle of the Sinhalas" or "lion island."

For nearly two centuries the word barely existed. Walpole's letters were not published until 1833. Reviewing a history of the word, Lorraine Daston writes that until the 1950s it had probably appeared in print only about twenty times. It reached the OED in its 1912-13 edition. The adjective serendipitous is first recorded only in 1943.

Scientists rescued it. Walter Cannon titled a chapter "Gains from Serendipity" in 1945. Robert Merton described a "serendipity pattern" in sociological research in 1946. In the 1950s he and Elinor Barber wrote a whole history of the word, which was not published in English until 2004. From research circles it spread to English speakers generally. Its everyday sense, as Daston describes it, became a pleasant unexpected discovery made while looking for something else.