To determine your daily calorie needs you can do the following calculation.
To estimate your daily calorie needs for maintaining your current weight, take your present weight In pounds) and multiply by 13. That number covers your metabolic needs for the day, factoring in a bit of light activity. So if you weigh 180 pounds, you need about 2,340 calories per day. Source Runners World article
To lose weight, you need to go into calorie deficit, that is eat less than you need or maintain your daily food intake but increase your daily activity.
To gain weight, you need to go into energy surplus, i.e eat more than you need.