When you format or factory reset your phone then the google account gets removed including all data. So, if you are going to format your phone then not it that your google account will be removed.