If you are interested in the question from a scientific perspective, you can get a number and see what influences the number. Nothing wrong with that. If you are interested in getting a number for your purpose (losing, gaining or maintaining weight) and expect that by adding all the numbers from food labels for what you eat in a day and subtract the number obtained from adding your base metabolism, calories spent exercising from tables or your heart rate monitor, etc... to get a net calories gain and predict what will happen yo your body, then this will not work. There are so many uncertainties in all these quantities and variations from person to person that this cannot be done accurately.
You can look at this
Scientific American article to learn more on the food aspect. From the calories consumed aspect, base metabolism varies greatly from one person to another, and calories burned will depend greatly on efficiency and accuracy of measurement (what is meant for example by "playing basketball". I'm sure a pro basketball athlete and kids just shooting baskets in a park spend a very different amount of calories "playing basketball for one hour".
You can probably get information by comparing different foods or exercises to each other, even if that's not perfect. If you never looked at these charts, this can be an eye opener. Compare an oven baked chicken breast to two doughnuts, and be prepared to be surprised. However, if you want to predict what exactly you should eat for your intended results, this will not work. The best you can do is get estimates, and see how your weight fluctuates, and then adjust. For example, the formula tells you you should lose 5 pounds a month, but your weight stayed the same. If you really logged everything correctly, this means that you either spend even more calories or consume less food. However, given that scales are usually precise to the nearest pound and that your weight can easily vary by a pound or two from day to day just in the amount of water and other substances (think gut content...) you have in you, even that is not that precise.
Unless you can stay in a very controlled environment (they have special rooms in which your oxygen consumption and all the relevant variables are measured to study these things), there is no hope of being accurate.