When do you find out gender?

Rana

I thought you find out the baby’s gender in the 4th month but I read around 18 weeks which starts the 5th month? When did you guys find out the gender?