It is based on your zip code, which are tied to certain regions that the military uses. Wherever your home of residence is. After that, it is based on whether or not you have dependents. BAH does not increase based on rank until you're E5 (Sergeant) or higher.