It took seven years.
I was able to stay pretty much in the black all the way through my undergraduate and graduate education. I went briefly into a bit of debt to move across 3 times zones to my first post-doc, but I was out of debt before I started my second post-doc in Melbourne.
The end of my second post-doc was when I went seriously into the red, long term.
I had to a trans-Pacific move back to North America. When I came back, I was unemployed for a while and owed taxes. I was offered the job I currently hold a couple of months later, and then had a trans-continental move. That combination sunk me. I got a line of credit with my bank extended, and that was how I paid to get here to start my job.
I was slowly paying off the debt, but sunk back when I decided to hire a lawyer to help with my green card application (worth every penny), and had to dip into the credit line again.
Today, thanks to some summer teaching and a little bit of grant salary, I paid back the last big of money owed on my credit line. Today, I am not debt free (I still have a lot of payments left on the world's friendliest car), but this is a relief.
I mention all of this just in case you ever wondered when in their career professors start to pull into the black. Everything in this job is about the long haul.