Web Dev Simplified Blog

Do You Need To Know Math?

April 19, 2021

Programming and math are about as closely tied as peanut butter and jelly or the sun and the moon. It seems you can’t talk about one without eventually talking about the other as well.

My goal with this article is to figure out if there is a reason programming and math are always talked about together and if programmers actually need to know math to be successful.

If you prefer to learn visually, check out the video version of this article.

Why Do Programmers Learn Math?

If you go to a university to study computer science or computer engineering then you will be bombarded with seemingly endless amounts of required math classes. I know when I was in school for computer engineering I probably took as many math based classes as I did programming based classes.

Luckily, math was a subject I enjoyed and did pretty well in so it wasn’t too big of a deal for me, but I had tons of friends that really struggled with math and hated the obscene number of math classes they were required to take. I even knew people that switched majors just because of the math needed for a programming degree.

You would think with all this emphasis placed on math that programmers would use math all the time but in reality advanced math is very rarely used in programming. The real reason for all these math classes is to train your problem solving skills.

Since schools are based on grading systems they tend to choose classes that can be graded easily such as math. Since math always has right and wrong answers it is easier to give a grade to it than other forms of problem solving such as building a large web application so math is the natural choice for many universities when it comes to training problem solving skills. Schools also focus on preparing you for graduate studies and graduate students are more likely to go into research/theoretical fields which require heavy math use.

Unfortunately, this means that many people that struggle with math are excluded from these types of degrees even though they would be great programmers. This is because being skilled in math does not mean you will be a skilled programmer and being bad at math does not mean you will be a bad programmer. All math does is help you train your problem solving skills.

Luckily, that is not the only way to train problem solving, though. It is honestly probably the least fun way to train. Instead I prefer making projects and practicing actual programming to solve problems. I find it much more effective and obviously it is way more enjoyable than figuring out how many apples Sally has after giving 3 to Matt and 2 to Jill.

How Much Math Do You Actually Need To Know?

With all this talk about math only being useful to learn problem solving you are probably wondering how much math you actually need to be a programmer. This answer varies a lot depending on the field you go into, but for 90% of developers and nearly all web developers you don’t need to know any more math than basic algebra. 99% of the math I do as a web developer is simple addition, subtraction, division, and multiplication and if I need something more complex I generally just Google it. If you can pass middle school/early high school math then you know enough math to be a programmer.

There are some fields where advanced math is useful, though. If you are working in game development, specifically 3D game development, then you will need to know quite a bit more math as you will be working with physics engines, 3D model rendering, and much more. Depending on what you specifically do for game development you may need to understand things like trigonometry, basic calculus, and some more advanced algebra.

If you want to work on artificial intelligence then you definitely need a strong math background. You will need to know advanced calculus and linear algebra to understand how the learning models work. This is probably one of the programming paths that requires the most math.

If you goal is to go into a field that requires more math and you are not strong in math, don’t worry. There are tons of things you can do in game development, machine learning, and other math heavy fields that actually don’t require much math at all.

Conclusion

If you are getting into programming and you are bad at math, then don’t worry. You really don’t need much math as a programmer and instead you just need strong problem solving skills which can be learned through other means than math such as building projects.