ON JULY 19th 1695 an intriguing advertisement appeared in the Collection for the Improvement of Husbandry and Trade, a London periodical. The husbandry involved was, potentially, that of “A gentleman about 30 Years of Age, that says He has a Very Good Estate”; the trade was an offer to “Willingly match himself to some Good Young Gentlewoman, that has a fortune of £3,000 or thereabouts.”

The personal ad went on to become a staple of the newspaper business, and remained so for centuries. Now, like so much of the rest of that business, announcements of matrimonial and other availability have moved to the internet. The lonely hearts of the world have done very well out of the shift. Personal ads never accounted for more than 1% of marriages in America. Today dating sites and apps account for about a sixth of the first meetings that lead to marriage there; roughly the same number result from online encounters in venues not devoted to such matters.

As early as 2010 the internet had overtaken churches, neighbourhoods, classrooms and offices as a setting in which Americans might meet a partner of the opposite sex. Bars and restaurants have fallen since (see chart). For those seeking same-sex partners the swing is even more striking. The internet is the primary meeting space for same-sex pairings, whether casual or more than casual: 70% of same-sex relationships start online. “This is a very big shift in how people find their partners,” observes Reuben Thomas, a sociologist at the University of New Mexico. “It’s unprecedented.”

For most of human history, the choice of life partner was limited by class, location and parental diktat. In the 19th and 20th centuries those constraints were weakened, at least in the West. The bicycle increased young people’s choices immeasurably; so did city life. But freed from their villages, people faced new difficulties: how to work out who was interested, who was not and who might be, if only they knew you were.

In 1995, less than a year after Netscape launched the first widely used browser, a site called match.com was offering to help people answer those questions. As befits a technology developed in the San Francisco Bay area, online dating first took off among gay men and geeks, but it soon spread, proving particularly helpful for people needing a way back into the world of dating after the break-up of a long-term relationship. Couples who had met online became commonplace.

The 2010s have seen these services move from the laptop to the phones with which young people have grown up. In 2013 Tinder, a startup, introduced the masterfully simple idea of showing people potential partners and having them simply swipe right for “yes” and left for “no”; when two people swiped right on each other’s pictures they were put into contact with each other. It proved a huge hit.

Such phone-based services are more immediate, more personal and more public than their keyboard-based predecessors. More immediate because instead of being used to plan future encounters, or to chat at a distance, they can be used on the fly to find someone right here, right now. More personal because the phone is intimate in a way the keyboard is not, camera-ready and always with you. More public for the same reason. Many people now feel quite happy swiping left or right on public transport, gossiping to their friends about potential matches. Screenshots of possible partners fly back and forth over WhatsApp and iMessage. Once confined to particular times and places, dating can extend everywhere and anywhere.

It’s just the power to charm

Not all countries and classes are adopting online dating at the same rate or in the same way. Americans are charging ahead; Germans, comparatively, lagging behind. India, which has long had a complex offline market for arranged marriages within religious and caste boundaries, has seen it move online. Last year saw a rare Indian tech-sector IPO when matrimony.com raised 500 crore rupees ($70m) to help it target the marriage market.

In countries where marriage is still very much in the hands of parents, today’s apps offer an option which used hardly to exist: casual dating. Yu Wang, the chief executive of Tantan, founded in 2015 and now one of China’s largest dating apps, says the country’s offline dating culture is practically non-existent. “If you approach someone you don’t know and start flirting, you’re a scoundrel,” he says. But on Tantan “you don’t expose yourself, there’s no danger of getting rejected, you cannot lose face.” As of February, Tantan had 20m users and had created some 10m couples, Mr Wang says, adding: “That’s a significant effect on society.”

Unfortunately, the level of significance is hard to analyse or quantify. A great deal of the relevant data are treated as proprietary by the companies gathering them. The business is worth $4.6bn globally, growing fast and highly competitive. Match Group, which operates Tinder, the original match.com and some 40 similar businesses, had revenues of $1.3bn in 2017—a similar figure to the revenues of American condom sellers. Tinder has 3.8m paying subscribers; a number of its founders and early employees are suing Match on the basis that it had intentionally undervalued the company to avoid making big payouts.

Although Tinder has a clear lead, there are competitors in America, such as Bumble, set up by one of Tinder’s founders after leaving the company, and around the world, all seeking to sell themselves on some refinement or other. Facebook is getting into the market, too. Users of many dating apps already link to their Facebook accounts to show who they are; a dating app that knew all that Facebook knows would have a powerful edge if it could use it well—and if users did not balk at the idea in a post-Cambridge Analytica world. None of the companies are interested in making it clear what secret data sauce—if any—they add to their wares.

Where data are available, mostly through national surveys, sociologists like Mr Thomas have found that online dating by and large leads to better matches—presumably because of the far greater choice of partners it offers.

The benefits are clearest for people whose preferences mean that discovering possible partners is particularly hard, either because of social isolation or physical isolation. Same-sex dating, which both operates in a smaller pool than heterosexual dating and is illegal or socially unacceptable in many places, is a particular beneficiary. Matching with same-sex partners over the internet is often far safer and more convenient than trying to do so in person.

The internet thus helps those with similar, and sometimes quite specialised, views on what makes for good sex, or indeed on more or less anything else. There are dating sites for various esoteric preferences, and sites on which one can find more than one partner at a time. There are sites for women who want a man to father a child with them but not become a romantic partner. There are services for Jews, Christians, Muslims, Trump supporters, people who self-select as intelligent and vegans. There’s BikerKiss (“Two wheels, two hearts, one road”), FarmersOnly (“Single in the country”) and Ugly Bug Ball (“Dating for the aesthetically average”).

How much happiness these particular possibilities for granularity have brought about is not known. But there are some figures for the field as a whole. In a 2013 study researchers from Harvard University and the University of Chicago showed that marriages that started online were less likely to end in break-up and were associated with higher levels of satisfaction than marriages of the same vintage between similar couples who had met offline: the difference was not huge, but it was statistically significant. Couples who met online also reported being slightly more satisfied with their marriage than those who met offline, by an average of one fifth of a point more on a seven-point scale. Scaled up to the third or more of marriages in America that start online, that would mean that close to a million people have found happier marriages than they would have otherwise thanks to the internet—as have millions more around the world.

These findings chime with those from Mr Thomas and Michael Rosenfeld of Stanford University, who work with data from the How Couples Meet and Stay Together survey, conducted every few years by GfK, a research firm. Again, married people who met their partner online reported slightly higher relationship quality than those who met offline, and were less likely to have broken up after a year of marriage. Mr Rosenfeld has also shown that heterosexual relationships which start online and progress to marriage do so faster than those which reach that honourable estate from an offline beginning.

This makes sense. Offline, people meet others who are like them in various ways—who know the same people and work in the same places. Online they can meet people not like them in those ways, but like them in other ways that may matter more. You can meet people who aren’t like you and select those who are, says Jess Carbino, the in-house sociologist at Bumble.

One aspect of their lives where people like to be in sync with those they meet online is in religious beliefs. Education levels and age also play a strong role—but an asymmetric one. Research by Elizabeth Bruch and Mark Newman of the University of Michigan, published in Science Advances on August 8th, used messaging data from one of the large dating apps (they were not allowed to say which) to rank daters according to other users’ tendency to message them. The analysis shows that female desirability starts high at 18, then drops sharply with age. Male desirability starts low, rises until about 50, then tails off gently (see chart). A postgraduate education makes men more desirable, while reducing desirability for women. These generalities are predictable and somewhat depressing. That said, they are trends, and specific results are what matter to users. The idea is not to appeal to the most people, but to be found by the right person.

One effect where internet dating seems to be mixing things up a bit is race. Josue Ortega, a sociologist at the University of Essex, argues that by opening up a racially mixed pool of partners in places where social groups tend to be more homogenous, the internet will increase the number of mixed-race couples. Using a computer model based on real-world data about racial preferences, he has shown that in a world where people are highly connected with others of their own race, but only poorly so with people from other races, even random links to perfect strangers will quickly increase the percentage of interracial marriages. Mr Thomas’s work has led him to a similar conclusion. “People are suddenly meeting in this new bar, the internet, where anyone can get in...and there’s a lot more diversity in it.”

That said, not everyone in the bar is treated as equal. Internet dating makes various ways in which race and gender interact quite clear. The research by Ms Bruch and Mr Newman shows that users of all races find Asian women more desirable than Asian men, sometimes much more so; black men were responded to more than black women.

I never wave bye bye

Many users, while welcoming the broadening of choice that the online world offers, are also becoming aware of its downsides. For those who find popularity on the apps, endless choice can become something of a burden. Blessing Mark, a 24-year-old massage therapist from Lagos, Nigeria, uses Tinder for two purposes. She finds clients (rather as your correspondent found people through Tinder in researching this piece) and she seeks out romantic partners. For marketing her business, she says, Tinder is essential, but her love life on the app has turned sour. “I feel like I’m no longer the person I used to be,” she says. “I go for dinner and I fuck and that’s it.”

Others talk of the exhaustion of trawling through endless matches, going on disappointing dates with some of them, then having to drag themselves back onto the net when it goes nowhere. There is a loneliness, too. The internet uncouples dating from other social activities which might comfort a shy or spurned heart in the offline world; love’s vicissitudes can be harder when taken away from the context of a club or church hall.

It is tempting to hope that people made unhappy by online dating will stop. But people do things that make them unhappy all the time, and businesses often profit from their sadness. Dating apps want existing users to keep using them, maybe even to start paying for new features. Desperation is not necessarily their enemy; the achievement of domestic bliss is certainly not their friend.

Nevertheless, new services do seem to be looking at ways to make their users happier. Hinge, a popular app bought by Match in June, asks users to answer three short questions as part of setting up a profile, providing fodder to get conversation going—Tinder, but with full sentences. Luna is attempting to build a reputation market. Good dating etiquette—sending messages to people when warranted, responding to them, behaving nicely if a date ensues—will be rewarded with an in-app currency called Stars. These can then be spent to send messages to popular users, or exchanged for cash, or donated to a charity. The founders hope this focus on experience will keep their business goals and their users’ personal goals well aligned.

There are other problems, too. The one that worries Tantan’s boss, Mr Wang, is that 5% of his customers will never get a match, no matter how much they swipe.

Men on Tantan, he says, tend to like about 60% of all the female profiles they see, but women like just 6% of the male ones. The least attractive women receive similar levels of attention to the most attractive men, says Mr Wang; all can find someone reasonably attractive. Men at the bottom of the ladder end up completely matchless. This fits with the work by Ms Bruch and Mr Newman. In general, both men and women concentrate on people that the common opinion of the site rates as 25% more attractive than they are. Even for women not seen as desirable, that can work. For the least desirable men, nothing works. “I don’t expect that final 5% to be that easy to help,” says Mr Wang.

But he is going to try. Tantan is using the data it has on its users—their photos, the text of their profiles and their biographical details—as well as their every swipe, like and text message to train an algorithm which will act as a more active matchmaker, one that connects not just people who fancy each other, but people it thinks will have good conversations. There is a scene in “A Beautiful Mind”, a film about John Nash, in which he advises a group of fellow mathematicians on how they can all leave the bar with a girl: the key is for each to go for one or other of the less pretty girls in the group they are eyeing up, rather than all horning in on the prettiest; if they all go for her, then their attentions will cancel each other out, and her friends, piqued at being second choices, will reject them too. This scene greatly irritates people who know what a “Nash equilibrium” is in game theory, because its scenario isn’t one. Nevertheless, it inspired Mr Wang. He aims to use data from the whole market to suggest good partners for each person. If this works, Tantan will reap the rewards. Although network effects give an advantage to a dating app with more users—something which makes current apps worried about Facebook’s intentions—it is not an overwhelming one. Many people use more than one app. If they look at the same group of people through different apps and find that one consistently provides matches they like more, they may stop subscribing to the ones that work less well, and they may tell their friends. Better products can thus hope to be rewarded. Reducing romance to number crunching may sound crass. It will doubtless have its limits. But many phenomena that appear complex from a human perspective often turn out to be simple seen through disinterested data. The trick is finding the data that do it best, which is perhaps the most interesting area for dating apps to compete in: is it heartbeat on first meeting, measured through a smartwatch? Time spent on first dates? Netflix queues? Subway stops missed on the way home?

Whatever the telltale data turn out to be, the experience of love will continue to be ineffable, and its pursuit strewn with hardships. But making the path that bit easier to navigate seems likely to make many lives better, and many people happier. That is no mean thing.