To calculate your calorie intake for weight gain use the following formula.
Calories For Weight Gain = Bodyweight In Pounds Multiplied By 16-20+
For example in a 170lb individual this would give an estimated calorie intake of 2720-3400+ per day.
As with any formula for calculating calories remember this will only give you an estimate. You may find you need to fine-tune up or down based on your own personal results.