It depends on where you live!
In England, you can legally change your name at any point by Deed Poll. Once you have that document then most companies will change your name and gender on their records.
Also if you get a letter from your gp confirming that you are transitioning, then passport office and DVLA will change your gender on your passport and driving license.
At which point you are pretty much effectively male, and have almost all the rights (and responsibilities) of a male
However for legal purposes (ie only relevant if its taken before the courts, or for marriage/civil partnerships) you have to get a Gender Recognition Certificate, which you can get after being full-time for 2 years (usually counted from when you changed your name and gender on documents).