What is the earliest you can see the gender on an ultrasound?

What’s the earliest you can tell the sex on an ultrasound? I have an ultrasound Monday and I’ll be 18 weeks but I heard that can be too early…