uh... It's mostly memory. "normal" (I hate that word but it is sufficient) people do arithmetic by doing things like carries ("carry the 1") or borrows, like in division.
These methods are stupid. They are inefficient and rely on paper unless you have a weirdly good memory. In short, you can't really do that in your head very well. And even if you can, eventually your brain will melt from all the unnecessary processing. I used to do really poorly in math as a little kid because i REFUSED to do this (and therefore either didn't show my work or showed it happening in a way the teachers weren't prepared to see) and even though my answers were right.
The key is in understanding what is happening to numbers when you combine them. Think of this example.. We'll take a really easy one that you probably CAN do in your head. Say you want to multiply something by 5. Sure, ok you can count by 5s. But isn't it easier to just multiply that thing by TEN and then take half of that answer? Because 5 is half of 10.
This doesn't work for every number but there are tricks for almost all of them.
For example, if you wanna multiply 77 x 99, that's the same as 77 x 100 - 77 How do i know this? Think of multiples as "sets of things". 77 x 99 is just another way of saying "I have 99 groups, each containing 77 numbers." It's just arithmetic! (on speed..) If i have 100 groups with 77 numbers in each one, the answer is easy. 7700. But we want to take away ONE SET (because we want 99 sets, not 100) So we take away one set of 77.
Uh.. somebody can explain this better but this is how you do it.
By that logic, If i want to multiply 77 x 98, I can also say 77 x 100 - (77 + 77) If i want to multiply 77 x 97, i can also say 77 x 100 - (77 + 77 + 77) and so on.
(And there are also tricks within tricks. 77 + 77 + 77, or 77 x 3, can also have a 3 trick applied to it.)
I'm guessing there are tricks you can use for each number if you google them. I can't really take a ton of time to list them all but i bet anything they ARE out there.
(17 is a freak number and there aren't many "easy" ways of dealing with multiples of 17. Don't let 17 get you down. That guy is a douche. )
There are even MORE (vastly more) efficient tricks than this but this will get you started in thinking this way. As you get used to working around outdated and BAD solutions you were taught in school, you'll find more efficient ways. Some of them are harder to explain and sound ridiculously complex. But it's really about retraining your brain. I STILL DON'T UNDERSTAND how people use carries and borrows and if i do it this way, i often make stupid mistakes. You can't do these well if your handwriting is illegible. Mine is.
The truth is that anybody can do arithmetic in their heads but if your memory is good, you'll be better at it than those who don't have great memories. The most important thing you can know? FORGET SCHOOL. Forget those teachers who hated math as much as they made you guys hate it. They taught you bad methods because THEY were taught bad methods. Sure, I had good methods but i like numbers and find them friendlier than people :) So i more or less ignored things that didn't make sense and instead focused on finding ways that DID.