IN THE heyday of the talkie, Louis B. Mayer, head of the biggest studio, was Hollywood’s lion king. In the 1980s, with the studio system on the wane, “superagent” Michael Ovitz was often described as the most powerful man in town. Now the honour falls to someone who used to run a video store in Phoenix, Arizona.

Ted Sarandos joined Netflix, a DVD-rental firm, in 2000. In 2011, when Netflix was first moving into streaming video, he bought “House of Cards”, a television drama starring Kevin Spacey and Robin Wright and produced by, among others, the film director David Fincher, for $100m. The nine-figure statement of intent was widely derided as profligate, showing that Netflix might be a source of cash but scarcely offered serious competition. A mail-order video store could hardly be expected to take on networks and studios which took decades to build and were notoriously difficult to run.

Instead it has become an industry in and of itself. Mr Sarandos, Netflix’s chief content officer, and his colleagues will spend $12bn-13bn this year—more than any studio spends on films, or any television company lays out on stuff that isn’t sport. Their viewers will get 82 feature films in a year when Warner Brothers, the Hollywood studio with the biggest slate, will send cinemas only 23. (Disney, the most profitable studio, is putting out just ten.) Netflix is producing or procuring 700 new or exclusively licensed television shows, including more than 100 scripted dramas and comedies, dozens of documentaries and children’s shows, stand-up comedy specials and unscripted reality and talk shows. And its ambitions go far beyond Hollywood. It is currently making programmes in 21 countries, including Brazil, Germany, India and South Korea.

Mr Sarandos buys quality as well as quantity with his billions. From Mr Fincher on, he has hired directors both famous and interesting, including Spike Lee, the Wachowski siblings and the Coen brothers. He is building a bench of established television hit-makers: Ryan Murphy (creator of “Glee” and “American Horror Story”) and Shonda Rhimes (creator of “Grey’s Anatomy” and “How to Get Away with Murder”) both recently signed up. David Letterman has come out of retirement to do a talk show. Barack and Michelle Obama have signed a production deal, too. The money helps: Mr Murphy’s deal is reportedly worth $300m; Mr Letterman is said to be getting $2m a show. But so does the company’s growing reputation. “They want to be on the channel that they watch,” Mr Sarandos says.

In the first quarter of this year Netflix added 7.4m net new subscribers worldwide. That gave it a total of 125m, 57m of them in America. With an average subscription of $10 a month, those customers represent some $14bn in annual revenue which the company will plough straight back into programming, marketing and technology—along with billions more that it will borrow. Goldman Sachs, a bank, thinks that it could be spending an annual $22.5bn on content by 2022. That would put it within spitting distance of the total currently spent on entertainment by all America’s networks and cable companies.

Enticed by such prospects, the market values Netflix at $170bn, which is more than Disney. Some analysts see this as outlandish for a company which is spending far more than it collects in revenues, which has $8.5bn in debt and hasn’t even had that many hit programmes. Its competitors, though, see it as a call to arms. It was the prospect of building a similarly integrated producer, purchaser and distributor of content that led AT&T, a wireless giant, to buy Time Warner for $109bn. If Comcast, America’s largest broadband provider, buys most of 21st Century Fox from the Murdoch family for more than $70bn, it will be to a similar end—and if the Fox goes to the mouse house instead, it will be because Disney knows that to compete with the new giant it needs to own even more content than it already does.

Amazon, Apple, Facebook, YouTube and Instagram are all developing programming efforts of their own. “The first thought on everyone’s mind is how do we compete with Netflix?” says Chris Silbermann, managing director of ICM, an agency that represents a number of people who have signed huge deals with Netflix, including Ms Rhimes and the comedians Jerry Seinfeld (another $100m deal) and Chris Rock (two comedy specials for a reported $40m). “Apple wouldn’t even be thinking about this business if it wasn’t for Netflix,” says Mr Silbermann. “Neither would Fox be in play.” Rupert Murdoch chose to break up Fox to get out of Netflix’s way. Jeff Bewkes, the former chief of Time Warner, acknowledged after agreeing to sell his company that Netflix’s direct connection to the consumer gave it a huge advantage.

Nobody can watch everything...

For Mr Bewkes that was quite a reversal. At the beginning of this decade he poured scorn on the idea that Netflix could be a competitor, comparing it to the “Albanian army”. “He did not believe that the internet was going to be material for a very long time,” Reed Hastings, co-founder and chief executive of the Albanian forces, recently told The Economist in Amsterdam, Netflix’s European headquarters.

What Mr Bewkes missed, but Mr Hastings did not, was not just that the wireless internet would become a reliable conduit for high-quality video, but that in doing so it would change the rules of television. There would be no time slots and no channels, no waiting until next week to see whom the Lannisters betray or the Good Wife sleeps with. Given big enough pipes—in September 2017 Netflix streams were taking up 20% of the world’s downstream bandwidth, according to Sandvine, a network-equipment firm—a company would be able to offer every one of its customers something he wanted to watch, whenever and wherever he wanted to watch it, for as long as he wanted to.

That company would need two things: a big, broad, frequently renewed range of programming; and an understanding of its consumers deep enough to serve up to each of them the morsels most likely to appeal. This mixture of breadth and depth, of content and distribution, of the global and the personal, is the heart of Netflixonomics—the science of getting people to subscribe to television on the internet.

One of the reasons that Netflix is spending in such haste is that Netflixonomics is a winner-takes-most proposition. People can only spend so much time being entertained by television. If you can provide them with entertainment they genuinely enjoy for that length of time, they will have little reason to pay anyone else for further screen-based entertainment—though they may splash out more for sport, and put up with adverts for news, real or fake. Being big early thus constitutes a first-mover advantage. And the dash towards size has the helpful side-effect of driving up rivals’ production costs at the same time as it eats into their revenues. Netflix is “intentionally trying to destroy us, the existing ecosystem,” says one Hollywood executive.

Todd Juenger of Sanford Bernstein, a research firm, says Netflix could have 300m subscribers by 2026, with revenues per subscriber of $15 a month; that suggests $24bn in earnings before interest, taxes, depreciation and amortisation and an enterprise value of at least $300bn, Mr Juenger argues. With investors expecting further growth on top of that, its market value would be a lot higher.

One far-reaching effect of Netflixonomics is that it has changed the calculus of whether a show or film is worth making. The company has identified some 2,000 “taste clusters” by watching its watchers. Analysis of how well a programme will reach, draw and retain customers in specific clusters lets Netflix calculate what sort of acquisition costs can be justified for it. It can thus target quite precise niches, rather than the broad demographic groups broadcast television depends on. Decisions about what projects to pursue, and whether to make them, are up to the executives in Hollywood; Mr Sarandos has 20 people working for him who have the coveted power to “green light” a project. But the boffins at headquarters in Los Gatos help set the budgets.

Once a show is ready for delivery, it is up to executives in Los Gatos like Todd Yellin, vice-president of product, to work out how to get it to the appropriate users and check that they are, in the corny parlance of the company, “delighted” by it. Netflix customers will scroll through 40 or 50 titles on their individualised homescreen, he says, before they choose a title. The choice can come down to details like the poster art, which Netflix tweaks algorithmically according to the aspects of a film or show that would appeal most to a given user.

The combination of personalisation and reach makes the Netflix homescreen the most powerful promotional tool in entertainment, according to Matthew Ball, a digital-media analyst. It lets the company get better results for a lesser-quality show than its peers can by showing it only to those who will like it. Most readers of The Economist will not have heard of “The Kissing Booth”, a romantic high-school comedy released in May. Critics hated it. But it has been seen by more than 20m households; millions of teenagers targeted by algorithms seem smitten by its leads, Jacob Elordi and Joey King.

Its quantitative understanding, and personalised marketing, of niche projects has seen Netflix revive cancelled shows with loyal fan bases, such as “Gilmore Girls”, and take up shows others turned down, such as “The Unbreakable Kimmy Schmidt”. It has got Emmy nominations for the A-list cast of a show about a pair of elderly women, jilted by their gay husbands, making sex toys (“Grace and Frankie”). Documentaries like “Wild Wild Country” became hot not just by word of mouth, but by being pushed on the homescreen, poster by individualised poster.

...but everybody can watch something

Netflix can take risks on such projects because failure costs it less than it does others. It does not shepherd users towards shows their co-clusterers have hated, so few come to distrust the brand because of seeing things they really do not like. Stinkers do not impose the opportunity costs of a poor performer in prime-time; no other shows have to be cancelled because the network could not programme Wednesday nights. The stuff for which there is no market just disappears.

Cheap, personalised, advertising-free, binge-released video is widely seen as having hastened a decline in audiences for broadcast television, thus doing a great deal of damage to television advertising. It has also led millions of American households to dispense with pay-TV. Americans aged 12-24 are watching less than half as much pay-TV as in 2010, according to Nielsen data; those aged 25-34 are watching 40% less. Networks devoted to scripted entertainment or children’s programming, as opposed to news and sports, have been hardest hit.

To stay in the game, cable networks and other streaming services have commissioned hundreds of hours of high-quality scripted programming, providing an unprecedented glut of good television drama. This has in turn been bad for cinemas. Ticket sales in America and Canada declined by more than 20% between 2002 and 2017—and by 30% on a per head basis. American studios are now either in the blockbuster business—the five Disney films released so far this year have made over $4bn worldwide—or devoted to low-budget offerings best enjoyed with a crowd, like horror.

Netflixonomics is also changing the way shows make money. Netflix usually buys up exclusive worldwide rights to the shows it makes and acquires, paying a mark-up over production costs. Creators forgo lucrative licensing of their shows to secondary markets because, in Netflixonomics, there are no secondary markets. That produces handsome upfront deals, but offers much less to the producers if they make something that outperforms expectations. And the bigger Netflix’s share of the market, the less generous its upfront deals may need to be.

Feel what the community feels

So producers are delighted to see competitors trying to emulate Netflix’s model of integrated production and distribution. Under AT&T, its new owner, HBO is expected to accelerate its move away from its premium-cable base towards direct-to-consumer streaming. It is investing more in shows developed outside America, too, and unwinding partnerships with foreign distributors so that it can stream its own wares worldwide. It will spend over $2.5bn on content this year—as will Hulu, a US-only streaming service co-owned by four studios and best known for its drama “The Handmaid’s Tale”. Apple has hired Hollywood executives to build out a television offering to which it has committed at least $1bn so far. YouTube—which is more watched than Netflix, but accounts for less of the internet’s bandwidth because of its lower definition—also has a subscription service alongside its much larger free-to-view business. Disney is pulling its films off Netflix and launching its own streaming service next year, hoping that its roster of Pixar, Marvel and “Star Wars” movies, not to mention copious princesses, gives it a must-have edge.

Amazon seems perhaps the best placed to compete globally. Its video service is already available pretty much everywhere Netflix is. Amazon Studios will spend more than $4bn this year on content. The company’s boss, Jeff Bezos, has said he wants Amazon to have hits as big and buzzy as HBO’s “Game of Thrones”. To that end the company paid $250m for the rights to make a “Lord of the Rings” TV show. But for Amazon, video will always be part of a bigger strategy. For Netflix it is everything.

Netflix’s investments beyond America give it an edge over all its competitors that goes beyond sheer size. It has started turning non-English-language shows into hits: “Money Heist”, a Spanish crime-caper series, and “Dark”, a piece of German science fiction about missing children, have both been watched by millions in the US, Mexico and Brazil. Nine out of ten people who watched “Dark” were from outside Germany. Upcoming releases include “Sacred Games”, Netflix’s first series in Hindi, and “Protector”, a Turkish superhero story. This summer “Jinn”, a supernatural teen drama in Arabic, will begin shooting in Amman and Petra. These shows will be dubbed into a range of other languages, as Netflix’s English-language shows are—and that range will include English. Americans are not accustomed to dubbing (outside of 1970s Bruce Lee films). But those watching “Dark” and “3%”, a dystopian Brazilian thriller, seemed to prefer it to subtitles.

By offering shows more out-of-the-ordinary and expensive than companies looking just at local markets can normally afford, these shows are meant to make Netflix an enticing premium product. They also allow it to sniff out the best writers and directors. In June Baran bo Odar and Jantje Friese, the creators of “Dark”, signed up to make more shows for Netflix. The company’s growth in international subscribers—up 48% in 2016 and 42% in 2017—suggests the strategy is working. Goldman Sachs, which is at the bullish end of Netflix assessments, finds that subscriber growth correlates with the rate at which newcontent is added. But Netflix faces several potential challenges. Its easy-sign-up subscription model is also easy to cancel. Netflix does not discuss its churn rate, but MoffettNathanson, a research firm, estimates it to be about 3.5% a month. That is much higher than pay-TV (around 2%) and wireless providers (closer to 1%). A second problem is its thirst for bandwidth. In markets that lack net-neutrality protections (such as America), dominant internet providers might decide to give their own streaming services precedence over Netflix. Aware of such risks, the company is increasingly persuading internet and pay-TV distributors like Comcast, T-Mobile and Sky to bundle its service with theirs, an about-face for some of these incumbents. There are other ways to stumble. Entertainment companies are exposed to public concerns about behaviour at the top. Netflix dropped Mr Spacey from “House of Cards” after allegations of sexual misconduct and recently got rid of a senior executive over his use of a racial slur; there is no way to insure against future scandals. And if the economy were to turn, reducing both consumers’ appetite for paid entertainment and investors’ appetite for junk bonds, a company which is valued entirely on the basis of putative profits after 2022 would be badly hit. Such a setback would slow Netflix’s growth—and give deep-pocketed competitors like Amazon or Apple time to eat into its leads in inventory, tied-up talent and personalisation. Some think that, even without such a setback, Netflix’s prospects are being exaggerated. In April MoffettNathanson declared that it could not justify Netflix’s share price “under any scenario”. It did not advise selling the stock, though, noting that investors believed in the Netflix story. Shares have risen by 38% since then, as Netflix reported one of its strongest-ever quarters of subscriber growth.

Sitting in Amsterdam, Mr Hastings appears unconcerned about competition. He argues there is room both for competitors to succeed and for Netflix to continue winning more screen time. He is instead looking towards the challenges of success—those that will arise when Netflix becomes a large presence in societies around the world. “What happened when Televisa used to be like 80% of the Mexican television market, what was it like then? What was their relationship with government, with the society?” Mr Hastings asks. Or Globo, a Brazilian media powerhouse. “How did they get along with their societies when they’re so strong? You have to be gentle obviously as you get that big. How did they pull that off?”

The world’s first global television giant may yet get to find out.

Clarification (July 25th, 2018): The original version of this article suggested that Netflix has never made a profit. It has in the past, and still does on paper. The wording has been changed to clarify that Netflix currently spends more than it collects in revenues.