the fact is you don't. you can get AN IDEA by using those online calculator calorie counters, and apps which track food. but that isn't going to be accurate.
the best way to figure this out is to weigh yourself in the morning after your morning shit everyday and see the trend.. if you are gaining weight you need to lower calories and vice versa depending on your goals
Google total daily energy expenditure (TDEE) calculator.
That will give you the caloric number you need to maintain your weight. If you want to gain weight, eat more then that number. If you want to loose weight, eat less then that number