I just got my paper work for it yesterday. You can take the blood test at 9 weeks and it takes about 7-10 days to get the results. It's 98% correct on the gender. I did it with my first and it was correct.
The blood work is not just to determine gender it's tests for a lot of things like birth defects it is offered from 12-16weeks and most insurances cover it
My doctor did it for me with both pregnancies at 16 weeks
I'm guessing if you go through an outside company it has a cost but if your dr offers it, it's covered by most insurances.
How much does it cost? It seems like you'll know at 18 weeks for free.