How early on gender?

Iy

How early can you tell the gender on an ultrasound accurately? I'm 16 weeks tomorrow and we have an appointment today. It's our first one in the second trimester. So third appointment. I don't know if they'll do an ultrasound, but if so is it very accurate or should we wait til 20 weeks? Thank you!!