The two most respected formulas used are the Harris Benedict equation, and the Mifflin-St.Jeor.
To convert -- inches X 2.54 = cm / pounds x .4535924 = kg
Harris-Benedict
Men = 66 + (13.7*Wt) + (5*Ht) - (6.8*Age)
Mifflin-St.Jeor
Men = (9.99Wt) + (6.25Ht) - (4.92Age) + 5
Take the answer you get from whichever one you work, and multiply it by the appropriate activity level....
Sedentary = 1.2
Lightly active (ex 1-3 day/wK) = 1.375
Moderately active (ex 3-5 dy/wk) = 1.550
Heavy (frequent exercise + active job) = 1.725
Extremely heavy (athelete/active job) = 1.9
Now, if you are trying to lose weight, then take that number and subtract either 500, or 20%, from it to create a caloric deficit for wt loss. If you are trying to bulk, then add 500 or 20%.
Most of the online calculators you find are going to be based on one of these two equations. The 500 calorie difference may very well be that one site creates the deficit for you and another doesn't, but it may not be, which creates confusion. This is why I think it's a good idea to know what the actual formulas are for yourself, rather than relying on some website calculator.