THE author of “Fifty Shades of Grey”, E.L. James, has mused at length about a billionaire inflicting punishment in her bondage-based bestseller. As the recipient of one of the first right-hand-drive versions of the Tesla Model S to hit Britain’s roads, personally handed to her at an event in London last week by Elon Musk, the carmaker’s wealthy boss, she is clearly attuned to billionaires dishing out pleasure too. The “range anxiety” that afflicts other electric-car owners has been minimised in the Model S by packing it with lots of batteries; the agony-inducing cost of filling up at the petrol station need never bother Ms James again. Other all-electric cars, costly and with limited ranges, have proved a hard sell. The models from most mainstream carmakers still look and feel like gimmicks. Tesla’s main achievement is producing a car which can be judged credibly alongside any fast and expensive petrol-propelled saloon. But the Californian company’s long-term growth prospects, and the widespread adoption of electric cars, are both dependent on a big drop in battery costs. Tesla’s next mission, to begin making a cheaper, mass-market electric vehicle in 2017, will rely heavily on ambitious plans for a new battery “gigafactory” in America.

Batteries are the priciest bit of electric cars. Mr Musk, a founder of PayPal and a serial tech investor, claims that his come much cheaper than those of other carmakers. Although Tesla has designed the powerpacks and their associated circuitry, each of them contains up to 7,000 standard lithium-ion cells of the sort found in laptops. The firm is said to buy more of these sorts of cell than all the world’s computer-makers combined.

Tesla argues that purchasing a common item in volume gives it a big advantage over other carmakers that have opted to commission custom-designed battery cells. It reckons that its battery packs, including their power-management and cooling systems, currently cost it less than $300 a kilowatt-hour (kWh) of storage capacity, about half the costs of its rivals.

The gigafactory, which will eventually turn out batteries for 500,000 vehicles, should cut their cost by another 30%, according to Tesla (see chart). Mr Musk reckons that two-thirds of that saving will come from scale alone—the new factory will double the world’s lithium-battery output—with the rest down to improved manufacturing technology. If Tesla makes good on its promise, electric motoring could finally take off. Sanford C. Bernstein, a research firm, reckons that when costs drop below $200 a kWh, battery-powered cars start to become competitive with conventional ones without subsidies. The gigafactory could bring Tesla close to that.

Yet some analysts doubt Tesla’s claims both of its current battery costs and its ability to cut them drastically. UBS, a bank, notes that raw materials account for 70% of the price of a lithium battery, making the scope for savings limited. And even if the factory does turn out lots of cheap battery cells, that will not be enough. Paul Rivera of Ricardo, an engineering consultant, reckons that the key to increasing range and performance, while cutting costs, is to improve the efficiency, size and price of the electronics that manage the power, along with overall vehicle weight. Tesla does not have the same advantages in these areas as it has with its batteries.

At a cost of $5 billion, which Tesla will share with Panasonic of Japan, its current battery supplier, and other partners, the gigafactory is a big gamble. But the company will surely get a good deal by playing off Arizona, Texas, New Mexico and Nevada, the states that want to host it. And if electric-car demand stalls, the huge output of cheap batteries could feed the market for distributed generation—storing energy from solar cells and discharging it when it is needed, helping consumers to go “off the grid”. Mr Musk, a self-confident man whose other projects include establishing a colony on Mars, is unlikely to be put off by the gigafactory’s doubters.