During ‘the most concentrated pain’ in his life, Elon Musk saved Tesla and created ‘the algorithm’ that would become his manufacturing and management philosophy

Elon Musk at a Tesla factory
Elon Musk personally oversaw efforts to overhaul Tesla's Fremont, Calif., factory from 2017 to 2018.
Noah Berger—Bloomberg/Getty Images

One of Elon Musk’s biggest accomplishments happened during what he refers to as the darkest, most difficult time in his life. 

In July 2017, Tesla had just introduced its Model 3 sedan, a more moderately priced electric vehicle compared to its earlier models. The company had a year to figure out how to produce 5,000 Model 3 sedans a week, the amount Musk had calculated was needed to keep the company afloat. But he didn’t have enough time to build more production lines, so he had to find ways to speed up the ones he already had. The turmoil led Musk to come up with what became known as “the algorithm —the five rules for overhauling Tesla and rescuing it from financial ruin,” according to a new biography by Walter Isaacson released earlier this week. 

  • Question every requirement 
  • Delete any part of the process you can 
  • Simplify and optimize
  • Accelerate the cycle time
  • Automate

A time of “concentrated pain” and a floundering company

In a roughly year-long span from the summer of 2017 to the fall of 2018 Musk was in a difficult place both personally (Isaacson describes “foul moods that led to catatonic trances and depressive paralysis”) and professionally (Tesla was $2.2 billion in the red). 

“That was the time of the most concentrated pain I’ve ever had,” Musk told his biographer in a new book released this week. “Eighteen months of unrelenting insanity. It was mind-bogglingly painful.” 

At work he was struggling with circling short-sellers, investors who bet the company’s shares would crater because they believed his manufacturing goals were impossible. Outside of work he was facing the combination of a tumultuous breakup with the actress Amber Heard, who he told a Rolling Stone reporter he “really loved,” and troubling news from his dad. Errol Musk had impregnated the woman that he had previously raised as a stepdaughter. Things spilled over into public view, with Musk wondering aloud on Twitter (before he purchased the social media platform) if he was bipolar

At the time, he was yet to become one of the world’s richest and most famous men. Musk was a wealthy but mercurial executive who had previously been pushed out of online payment service PayPal. In fact, his exorbitant wealth would only come about as a result of an unorthodox pay package at Tesla, which he would collect only after the company reached a valuation of $650 billion. Otherwise he would get nothing. 

Just as Musk didn’t have the same status then as he does now, neither did Tesla. In 2017, it was a company with promising technology, but  many investors felt it had overpromised on its manufacturing goals. Because Musk had told investors that Tesla was indeed on track to meet the production numbers, the company would risk a stock collapse if it didn’t meet the deadline he’d imposed. Skeptical of Musk, some big investors had begun shorting Tesla stock, certain that it wouldn’t make enough cars to be financially viable. Short-sellers “are leeches on the neck of business,” Musk told Isaacson. 

In a blog post in August 2018, Musk called Tesla “the most shorted stock in history.” While that may have been an overstatement—there were some $13 billion in Tesla short positions, according to S&P Global Market Intelligence—it was still a huge sum. Short-sellers who bet against Tesla alternated big paydays (making $1 billion in a single day in August 2018) and substantial losses (taking $1.3 billion in paper losses on one occasion).  

Musk coped with the stress of possibly losing his car company and a complicated personal situation in one of the only ways he knew how. “In times of emotional darkness, Musk throws himself into his work, maniacally,” Isaacson writes. 

To help Tesla reach the ambitious production targets he’d set for it, Musk began working in the factory to identify every single facet of its assembly lines that could be sped up in order for the company to hit its production goal. It ultimately led to the creation of “the algorithm” that would become a mantra for him and all of Tesla’s employees. 

Tesla’s scrambles create the algorithm 

Whenever one of Musk’s companies is given one of his incredibly difficult, possibly unfeasible orders, he expects his employees to work around the clock like he does. Musk calls these bursts of condensed effort “surges.” Isaacson says Musk likes to think of himself as a field general “personally surging into the breach with an all-hands-on-deck cadre of fellow fanatics.” 

It was under these circumstances that Musk honed “the algorithm,” ramping up production at Tesla’s gigafactory in Nevada and its other plant in Fremont, Calif. Musk admits he repeated it to an “annoying degree.” When he did so, “his executives would move their lips and mouth the words, like they would chant the liturgy along with their priest,” Isaacson writes. 

The algorithm is a step-by-step process that requires employees to question every aspect of a given process—safety regulations, the number of bolts in a car part, whether a task should be automated or not. 

Throughout the process Musk patrolled the factory floors, personally inspecting the assembly lines and troubleshooting problems as they came up. On one occasion he demanded a machine installing bolts move faster, so he rewrote its code on the fly. “Factory settings are always idiotic,” Isaacson says he told employees, after he reconfigured the machine to go more than three times faster. 

Musk also took a series of unorthodox approaches over this period, to mixed results. Ignoring conventional manufacturing practice, he insisted on designing Tesla’s Fremont factory by installing machines to automate every task from the outset instead of first using human labor and then automating where possible. After that turned out to be a disaster, he reversed course and became fixated on removing robots he felt were too slow. When he realized the factory floor had insufficient capacity he ordered the construction of a massive tent in a parking lot to house an additional assembly line. 

Eventually Tesla would produce record numbers of  Model 3s in the second quarter of 2018, according to the company

Tesla stock soars, as working conditions come under scrutiny

In the aftermath of the crunch that ultimately stabilized Tesla, Musk became the world’s richest individual. His Tesla holdings were worth an estimated $90 billion as of August, according to Nasdaq data. The company’s stock price has climbed from $20.88 in July 2017, when Tesla rolled out its first Model 3, to $267.48 on Tuesday, an 1,181% increase. Tesla now has an $838 billion market cap. 

But the gung-ho tactics Musk employed came at a distinctly human cost. Tesla has an injury rate that is 30% higher than the rest of the car industry, according to the book. Employees also alleged they were pressured to cut corners by using electrical tape to cover cracks in plastic brackets that hold electrical parts within the car and forced to work in smoky air during California’s wildfires, CNBC reported. The company denied these claims. 

Tesla’s soaring stock price and some of the tactics Musk employed to keep it high drew scrutiny from regulators. In September 2018, Musk and Tesla paid $40 million to settle an SEC lawsuit that he manipulated the company’s stock when he tweeted that he was taking Tesla private. As part of the settlement he was also forced to step down as the company’s chairman, although he remained CEO.  
More recently, Musk has applied the same all-in approach when he bought X, the former Twitter. Soon after his acquisition last year, he reportedly sent employees an email demanding they work “long hours at high intensity.” So far, results have been mixed, with ad revenue down, and few subscribers to X’s paid offerings. But given that analysts and commentators had similar doubts about Tesla, it may be a similar chips-are-down moment for the eccentric executive.

Subscribe to Data Sheet, our daily newsletter about the business of tech. Sign up for free.