Can Elon Musk Code? Yes, But He’s Not A Great Developer

So, you want to know if Elon Musk Can Code? Well, the short answer is yes, Elon Musk can code. Not very surprising from an individual with an estimated IQ of 150-155 and the founder of a handful of tech companies such as Tesla and SpaceX. But exactly how well can Elon Musk code and how did he get started in the world of programming? Well, people seem to have a misconception that billionare tech entreprenuers lke Mark Zuckerberg and Elon Musk must be great coders. However, that is rarely the case. Let’s dive into why.

Early Life And Coding

According to the book Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future, Elon Musk started coding at the young age of 10. At this point in his life, he became fascinated by a 5GB memory computer called a Commodore VIC-20.

commodore VIC20 Image

Elon had asked his father for the computer, and luckily for him, his father gifted it to him.

Soon after, Elon used the computer manual to learn the BASIC computer pogramming language. The training manual was estimated to take around 6 months to complete. However, Elon Musk was able to finish the manual in approximately 3 days.

Fastforward 2 years and Elon had sold his first game, titled Blastar, to a computer magazine company for a total value of $500 US dollars.

blastar game in magazine

The game required a total of 167 line of code to run and was written at a time when computers didn’t have proper GUI’s like they do today. Everything needed to be done on a terminal style interface.

Although a game like Blastar is nothing to gawk at, for a 12 year old in the early days of computing, it was something quite impressive.

This was Elon Musks first commercial success. It was also the starting point that paved the way for him to begin his career in tech.

Elon Musks Career In Code and Business

Although Elon Musk never had a 9-5 desk job as a programmer he did play a major role in coding his original start-up, Zip2. A company co-founded by Elon and his brother in 1995.

The software was used to provide a searchable business directory with maps of local businesses. Similar to an online yellow pages. Later, the software began to assist newspapers in designing online city guides. Partnering with a total of 160 newspapers before eventually being sold to Compaq Computer in 1999. Elon wrote the backend for this software in the C programming language.

According to the biography by Ashlee Vance, the software was eventually almost completely rewritten by its new hires. The computer science students that took over the project were able to re-write large chunks of code written by Musk in just a few lines of code. The codebase was also not very flexible originally. Meaning that if changes needed to be made in the future, it would be very difficult.

After his success with Zip2, Elon took the money he made from the company and re-invested it in his new startup, Another company where he played a large role in creating the original codebase. was an online bank co-founded by Elon Musk. In it’s later years, it was merged with their competitor, Confinity Inc. and became PayPal. In it’s merger a large part of it’s codebase had been re-written by more talented engineers.

From there, Elon went on to create Tesla and SpaceX. Although he did not play a large role in the development if these products. Marking his transition from part-time coder and into his focus on entrepreneurial endevours.


Elon Musk knows how to code. However, it is very obvious that he was never destined to become the best programmer in the world. If anything, Elon Musk was an above average self-taught coder that used his skills to propel his entrepreneurial career.

While Musk was a good enough coder to get his original projects off the ground, they later needed to be re-written by other engineers to properly scale the businesses.

So that’s about it! Now you know the answer as to whether or not Elon Musk can actually code. If you’re a self-taught developer yourself and are looking for ways to improve your skills, here and here are a great place to start.

Grant Darling

Grant is a full-stack / frontend software developer passionate about writing & coding. He has many years experience working in the tech industry both as a freelancer and as an employee.

The Code Bytes is all about providing people with honest information about programming. To learn more about Grant, read his about page!

If you’re interested in freelance coding / writing services or want to partner with The Code Bytes, you can get in touch with me here!