Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

It seems that conventional wisdom suggests that good programmers are also good at math. Or that the two are somehow intrinsically linked. Many programming books I have read provide many examples that are solutions to math problems, or are somehow related to math as if these examples are what make sense to most people.

So the question I would like to float is: do you have to be good at math to be a good programmer?


locked by World Engineer Jul 20 '13 at 5:04

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here. This question and its answers are frozen and cannot be changed. More info: help center.

closed as primarily opinion-based by World Engineer Jul 20 '13 at 5:04

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

@Mark Not necessarily. Learning a subject and liking it are two very different things. – Maxpm Mar 7 '11 at 8:09
Are you a king? Or conjoined twins? If no, I suggest you stick to "I" when referring to yourself. – drxzcl Mar 7 '11 at 9:57
@jk - you're correct most likely still think there's a good amount of art to programming ;p – Garet Claborn Sep 27 '11 at 4:44
I thought I never liked math. Later in life, I realized I just wasn't happy with the syntax. – MrFox Oct 31 '12 at 17:19
All of programmers use math all the time, they just don't realize it because it is so much different than math taught at school. Discreet math, lambda calculus, Boolean algebra, logic (!) are really advanced math concepts that we use every day. – rotman Nov 16 '12 at 18:41

67 Answers 67

I think it is possible. I personally know someone who sucks at math and as I know is a pretty good programmer.

However IMHO programming has a relation to discrete math and being good at that does help you in your programming.

But being able to integrate and differentiate and that kind of math is not really relevant, while that is where most people have problems with math.

Integration/Differentiation is Calculus, which is only one very small subset of math. The rest of mathematics still apply to programming. – user8 Sep 17 '10 at 8:39
Yea, that's what I meant. I feel that Calculus (and maybe Geometry) is where most people have problems with maths. The guy I know who is a good programmer but says he's bad at maths is most likely thinking about stuff like Calculus. While maybe the fact that he is good at programming might even imply that he is good at Logic and thus maths without even realising it. – Matthijs Wessels Sep 17 '10 at 9:02

The answer to this question is the same as if the question had been "Do we have to learn computer science to program?" Technically no, in that the ability to program doesn't require that you understand how caching works or how databases are fundamentally structured or even how the internet works. However, perhaps it limits what you're capable of programming. It's like thinking you can write poetry because you know english. Knowing how to formulate words to write poetry doesn't mean you can write poetry.

In this sense, you can program without knowing mathematics, though perhaps your inability to perform mathematics would undermine an essentially important skill of a programmer not only for not being able to do the mathematics but also for the ability to logically proof your code which comes only from years of programming experience or having performed proofs in mathematics, for instance.


As aforementioned, math is thought to be important to be a good programmer. Does that mean, just learning formulas make you a good programmer?

Per my experience it is the ability to observe situations, and decide based on the observation that is needed: you see a case and pose a question about it. And look for answers to solve it. If you can break it into parts as means of solution it is the better. But it is still in the realm of logic.

The ability to think logically, and looking at problem with the attitude of solving it is very rare in society... in terms of percentage. Even between smart and intelligent people there are ones that perceive faster or slower.

Math happens to be a field that people don't understand and hold confusing. While the logic people using their reasoning "work with it" until they understand it. Therefore often the ones not having understood math, tend to associate the two fields with each other. While they are not.

Being able to observe and decide can make you also a good leader, a good cook, and so on. But it is eventually your decision and motivation that makes you a programmer.


Not all maths are about crunching numbers. Anyone who can program is good at math relevant to programming. Remember: Mathematics is the study of patterns!


From my experience I can tell that there is math and there is other math. If we take a birds eye view at math from the scientific point of view, we will discover that dealing with math requires a high potential of thinking "a logical" way - while following strict rules. This is diffenrent to some other siences - lets say at Arts. So this logical apporach is absolutley mandatory to be a programmer.
Basicly the way you think while programming is very simular to the way you think while dealing with math.
Further there are lots of problems to be solved via math when programming, but this is what I tend to call the "real world math". You can find some examples in the posts above. Also writing a 3D engine is quite complex, the math behind isn't that complex at all. It just requires some structured thinking.
"The other math" is the one you deal with when you (e.g.) study math. There you don't do real world stuff anymore, you focus on more abstact tasks like defining or proving mathematic rules. That materia becomes very complex within a short period of time, but it is not required for your job as programmer.
In other words: you need a basic understanding of math and you should be able to think a structured way, but you do not need "high level" math to be a (good) programmer.


No, no, and a side of no. Math courses help you to develop a method of thinking and problem solving that is useful as a programmer. The actual math however proves entirely unnecessary in most jobs in this industry.


You can look through endless source on GITHUB or programming books/tutorials without encountering any maths. A lot of web programming has scarcely got anything to do with algorithms, never mind maths. To be a computer scientist? Perhaps. Just to be a good programmer? No way.


Not the answer you're looking for? Browse other questions tagged or ask your own question.