Between 17 and 22 weeks depending on if the little one will pose right for the camera so to say.
With my first we didnt find out. I liked the idea of the surprise though when I was about 7 months I told my hubby we needed to buy boy stuff. Hubby told me I was nuts,not a good thing to say to a pregnant woman but he did. I was the one with the last laugh when the doctor declared a boy.
Our second I was 19 weeks and had an ultrasound and low and behold another boy.