How many kCals is a gram of protein and how do you calculate how much protein a person should consume?

How many kCals is a gram of protein and how do you calculate how much protein a person should consume?