Can I freeze formula from a bottle my baby didn’t finish?

Like for instance she only drinks 2 oz of her 6 oz bottle, can I pour the leftover in a bag and freeze it or will it no longer be good once frozen? FORMULA FED