The types of foods you eat make a difference as well. Calories aren't just calories. Insulin tells your body to store extra calories as fat, so foods that spike insulin levels help make you fat. Well, guess what foods overweight people love to eat? Carbs, and piles of them. Guess what carbs do. They spike your insulin levels. Get a copy of a book called Why We Get Fat. Excellent book.
This is being written by someone that just dropped between 85 and 100 pounds and I've kept it off for going on a couple of years now. I devised some simple rules and eat a reasonable amount of healthy foods. One of my rules is, watch what fat people eat ... and don't eat that . You would be surprised how well that one simple rule works. :) The other thing I did was give up 1 to 2 sitcoms a day and get off my ass and exercise. Yes, I'm a database admin at work, so guess what I did a lot of. Sitting. I can do a 5K and smoke people half my age or more now. Three - Four years ago, I could hardly walk.