Ham is best cooked in a pan large enough that the ham doesn’t touch any of the sides. Thus the exact size of pan you need will depend on the size of your ham. For pre-cooked hams, a pan with a rack is recommended.