Calculating calories

I am looking for a scientific way to figure out daily calories for weight loss and weight gain. Anyone know a good site to calculate this or maybe john B could write a article about calculating calories for weight loss and weight gain and give a example

T-mag has covered that before in several diet articles. Research, my man!