Article
Code by the Numbers: How Many Lines of Code in Popular Programs, Apps, and Video Games?
Millions of lines of code are needed to program the apps that accompany us every day
- April 13, 2023
- Updated: November 27, 2024 at 8:42 PM
You may not often think about it, but behind every operating system, program, application or video game you use every day there are thousands or even millions of lines of code. An everyday action such as doing a Google search or checking your email in Gmail may seem simple but… Do you know how many lines of code are hidden behind the services of the big G? More than 2 billion! But is that a lot or a little? And if a program has many lines of code does it mean that it is better?
In today’s article we are going to dive deep into the world of programming and share with you how many lines of code the most popular programs, video games and operating systems of the moment have. We predict that you will be surprised!
How to find out how many lines of code a program has
To begin our article, we are going to show you how to calculate the source code lines of a program. Don’t worry because you won’t have to do it by hand. Fortunately, there are many programs with which you can find out the lines of code in just a few clicks.
If you want to calculate the number of lines of source code of a program, the procedure is quite simple:
- Download the source code of the program and unzip it in a folder.
- Download CLOC (Count Lines of Code) and copy it to the Windows directory.
- From the path where the folder with the code is located, type the command cloc <folder>
CLOC recognizes more than a hundred programming languages, and its report separates the code from blank lines and comment lines, which allows a more accurate calculation of the number of lines in the program.
Does more lines of code mean that a program is better?
Absolutely not. When we measure the lines of code of any software, we should not focus on whether a program has many or few lines of code, but on the results. In fact, most programmers are guided by the maxim that quality is better than quantity. It is therefore not surprising that, when creating a program or application, they always seek to optimize the results with as few lines of code as possible.
There is nothing better than an example to demonstrate this point. Imagine that a programmer creates an application with 1 million lines of code. Each and every line of that code is intended to display the message “Hello! How are you?” continuously. As you can see, just because the program has a large amount of code does not mean that it is complex.
Keep in mind that two of the maxims that every self-respecting programmer uses are DRY (Don’t Repeat Yourself) and KISS (Keep It Simple, Stupid). Although it is true that depending on the programming language used, more or fewer lines of code are needed, we will always try to optimize the results.
Are all lines of code part of the program?
No. A good programmer not only writes lines of code, but also adds notes and comments within them. These, although they are not part of the code as such (since they are not read by the computer, mobile or console), would be included in the line count. It should also be taken into account that programmers leave a large number of blank lines that, in the long run, constitute part of the word count.
How many lines of code do the main operating systems have?
In terms of complexity and number of integrated tools, operating systems are the software that usually have the most lines of code. Most of them are programmed in C and assembler, less tidy but more efficient languages.
A notable example is Mac OS X, Apple’s operating system, which contains more than 86 million lines of code. On the other hand, Windows XP has 45 million lines of code, while a complete Linux distribution can easily exceed 300 million.
Below is a list of the lines of code of some of the most widely used operating systems on the market:
- MS-DOS– 4000 lines of code
- Windows NT– 2 million lines of code
- Windows 3.1– 2 million lines of code
- Windows 7– 40 million lines of code
- Windows XP– 45 million lines of code
- Windows Vista-50 million lines of code
- Windows 10– 80 million lines of code
- Ubuntu– 50 million lines of code
- MacOS X– 84 million lines of code
- Android– 12 million lines of code
- iOS– 12 million lines of code
How many lines of code do the most famous programs, apps and games have?
If you’ve ever wondered how many lines of code your favorite browser has, the social network you open on your mobile or that messaging app you can’t live without, you’ve come to the right place. And today we’re going to put your mind at rest.
Although there are many factors that influence the number of lines of code in a program (its design philosophy, the language used, the number of comments inserted, etc.) these are the approximate numbers for each of them.
Web browsers
- Google Chrome-6.7 million lines of code
- Mozilla Firefox– 21 million lines of code
Office suites
- Microsoft Office 2013– 45 million lines of code
- Apache OpenOffice– 19 million lines of code
- LibreOffice– 10 million lines of code
Social networks
- Facebook– 62 million lines of code
- TikTok– 80,000 lines of code
- SnapChat– 60,000 lines of code
- Instagram– 1 million lines of code
- LinkedIn– 8 million lines of code
- Twitter– 10 million lines of code
Messaging apps
Media players and audio and video editors
- Blender– 1.1 lines of code
- Audacity– 161,007 lines of code
- VLC Media Player– 599,658 lines of code
- Media Player Classic– 168,007 lines of code
Image editors
- GIMP– 726,863 lines of code
- Adobe Photoshop– 10 million lines of code
- Krita– 1 million lines of code
P2P programs
- Ares Galaxy– 1,176,679 lines of code
- eMule-2,437,791 lines of code
- BitTorrent– its protocol has only 8,633 lines of code
- Vuze– 967,990 lines of code
Web applications
- WordPress– 160,636 lines of code
- Google Suite (Gmail, Drive, Search, etc.): 2 billion lines of code
- Reddit-139,659 lines of code
- Menéame– 23,190 lines of code
Video game
- Grand Theft Auto V (GTA 5)– 36 million lines of code
- Red Dead Redemption II (RDR2)– 60 million lines of code
- World of Warcraft (WoW)– 5.5 million lines of code
- Minecraft– 500,000 lines of code
- Age of Empires Online -1 million lines of code
This is what the programs look like through their lines of code
We hope that this article has helped you to learn a little more about how the lines of code of your favorite programs work and which ones have a greater number of them. As you can see, some of the results are simply amazing. And the fact is that hardly anyone would imagine that Google services have more than 2 billion lines of code. Remember, though: More code does not mean that a program is better.
Did you like what you read? Share this article with your friends on social networks!
Mireia Fernández is passionate about the world of video games and new technologies, a hobby that dates back to her childhood with the MSX HB 501p. Born and residing in Barcelona, Mireia has been working as an editor for over 10 years and specializes in writing reviews, tutorials, and software guides, as well as doing everything possible to publish news before anyone else. Her hobbies include spending hours playing on her console, walking her golden retriever, and keeping up with the latest SEO developments.
Latest from Mireia Fernández
- Generational Shifts in Search: AI and Social Media vs. Google
- Celebrate Data Privacy Day and Secure Your Data with Avast Free Antivirus
- You’re One in 200 Million: What Do Amazon Prime Statistics Say About the Future of Shopping And Streaming
- Spotify Vs Apple Music: Who’s Winning the Music Streaming Platforms Wars? Insights and More Stats Inside
You may also like
Dwarf Fortress receives its Adventure Mode, amplifying an already infinite game
Read more
Squid Game continues to dominate on Netflix and breaks a new record
Read more
In addition to the werewolf, Robert Eggers might be making the sequel to a legendary fantasy movie
Read more
Do you like Doom? Well, Doom: The Dark Ages has a collector's edition that will drive you crazy
Read more
Epic Games Store offers a new free game for Studio Ghibli lovers
Read more
Doom: The Dark Ages will not have multiplayer, but its developers claim that this is a good thing
Read more