Well, you can know it much earlier if you do a genetic screening. But it’s not recommended as a routine procedure for gender determination, since the risks outweighs the benefits. It’s better to wait till the ultrasound gives a definitive answer, which happens after 4-5 months.