<prompt> Human: So a little bit of background: Im 27 and have finished law school and taken a job in NYC. Id like to stay in the NYC metro area for at least the next 5 years or so and my thinking is that buying will be a better investment than renting. I have a decent amount of student loans, no credit card debt, decent credit, and am fairly frugal.Specifics:Student loans: 88k ranging from 3-6.8Current rentutilities: 1450 my share of a 2 bedroom split with roommateGross income: 160k Savings: 5kRetirement: virtually noneId like to pay back my student loans as quickly as possible. I plan to give the higher interest loans priority. I also would like to max out my retirement contributionsopen an IRA to get my retirement on track.I think that buying a home in the NYC metro area including eastern NJ commutable to the city, upper price range of 300k? would be smarter than renting for 5 years. First, is this a good idea given that NYC is not where I want to live permanently? Is there a number of years I should look to invest in a home to get the equity backcome out ahead? Are there steps I should take to set myself up to put myself in the best position to purchase and when would it make the most sense? After Ive paid off my loans entirely? Once Ive paid off a certain percentage? It just becomes an issue of whether Im putting aside money for a down payment or paying back loans.Any input is appreciated! This sub is great.  <response>: Check out the rent vs buy calculator in the FAQ. But you should have at least a 20 down payment. 