Gender discovery

Sa

How early can you find out the gender of the baby? Last time (5 years ago) it was twenty weeks. My next appointment will be 16 weeks. Can you tell by ultrasound then?