Muscle is built slowly, and the building site can only use so much material. Research on trained and untrained lifters points to a surplus of roughly 250 to 500 kilocalories a day as the productive range, supporting gains of about a quarter to half a kilogram a week for beginners, slower for experienced lifters. Eat far beyond that and the extra does not become extra muscle; it becomes fat you will later diet off. This is why the old eat everything approach, sometimes called dirty bulking, mostly produces a longer diet afterwards. A modest surplus, high protein and patience build more muscle per kilogram gained.
Calories supply bricks; protein and training draw the blueprint. Aim for around 1.6 to 2.2 grams of protein per kilogram of body weight across the day, spread over three or four meals. Then give the surplus somewhere to go: progressive resistance training, adding weight or reps over time, is the signal that tells your body to store the surplus as contractile tissue rather than around your waist. Sleep is the third instruction, because growth hormone pulses and muscle repair concentrate at night. Miss any one of the three and the same calories produce a visibly different result.
Wanting to gain is healthy when you are underweight, recovering, or building strength. It deserves professional input when weight loss was unintentional, when appetite has vanished, when a teenager is still growing, or when eating more triggers real distress. Unexplained weight loss can be a symptom, and it should be checked before it is simply reversed with calories. For everyone else, the method is boring and reliable: measure your maintenance, add a few hundred kilocalories, train progressively, weigh weekly, and adjust the surplus if the trend runs faster than half a kilogram a week for more than a fortnight. The calorie goal calculator above has a gain setting with the same three paces, so you can pick the surplus that matches your training experience and watch the weekly trend it predicts.