From the FAQ [0]:
"How is a user's karma calculated?
Roughly, the number of upvotes on their posts minus the number of downvotes. These don't match up exactly. Some votes are dropped by anti-abuse software."
[0] https://news.ycombinator.com/newsfaq.html