From what I've read on here, once you've made the decision to buy, it's best if you pay it off ASAP, avoiding as much interest payments as possible.
I agree with nereo's thoughts on this part. In general it makes the most sense to put down 20% to avoid PMI and hold the mortgage with today's low rates barely being above inflation. My mortgage is 3.625% and you'd probably get something similar. Another option would be to pay all-cash for a fixer-upper that banks would refuse to finance if that's your thing.
My problem is that somewhere in the next 5 years I'm hoping to attend graduate school out of state and won't be returning afterwards so a) does it even make sense to buy and b) If so, does it make sense to put the entire 140k down or say 100k down and invest the rest? I know I'm asking a difficult question with a lot of 'what ifs' which kinda points me towards renting until after I finish school but the idea of paying money to a landlord when I could be investing is hard to swallow.
This is where things get really gray. It depends on the market in your area, your goals, risk tolerance, and abilities.
People love to preach renting as "throwing your money away." Usually those people are homeowners (or aspiring to be). That's not always the case.
I'm going to make up some numbers, but you can plug in your own to paint the whole picture. I'm also going to assume you'd be renting something comparable to a house you'd buy.
If you leave for grad school in five years and chose to rent until then, you'd pay 60 months of rent and then leave. At rent of $1500/mo, that's a total of $75,000.
Now let's say you buy the $175,000 house. You put 20% down ($35,000) so you have a loan of $140,000. Closing costs of about $5,000. $638/month principle and interest. Insurance and taxes vary a LOT, but I'll pretend it's my house and put in $3000/year taxes and $700/year insurance, so that's another $308/month. Add in some for maintenance/repairs, you said new house so I'll lowball that at $1,000/year.
$1029/month so far. Five years from now you've paid $61,740 of that. Plus the $40,000 of down payment and closing costs so $101,740.
Then move and go to sell. By now you owe about $125,000.
Depending on what the market looks like in five years in your area, it could take anywhere from one to twelve months to sell. That's an additional $1029-$12,348 just in holding costs.
Your house that's worth $175,000 today could theoretically be worth (hand-wavy crystal ball here) $150,000 to $200,000 in five years.
You'll have to pay 6% for a realtor, and probably a few other misc fees/repairs/etc when selling. Call it 6% plus another $1,000. So you end up selling for $150,000-$200,000 and getting $140,000-187,000 after those costs. Subtract your $125,000 loan and you've netted $15,000 to $62,000.
So you spent $101,740 on down payment, closing costs, mortgage payments, taxes, insurance, and maintenance. Then you spent $1,029-$12,348 on holding costs while selling. Total of $102,769-$114,088.
So owning means you spend $102,769-114,088 over five years and then getting $15,000-62,000 back for a net total cost of $40,769-$99,088.
There's also opportunity cost on the down payment and closing costs. If you invested that $40,000 at 5%, that'd be $2000/year, so $10,000-$12,000 (taking into account the case where you take a year to sell). Brings your cost up to $50,769-111,088.
So somewhere between $50,769-111,088, or $75,000 to live somewhere for five years.
Plug in your own numbers to get numbers that are more true-to-life, but unless the rent/purchase ratio, taxes, or other things in your area are very out of whack, this is probably pretty close.
You might come out ahead buying, you might come out ahead renting. Renting is far more predictable, and the high transnational costs make buying more expensive on a five-year scale. It's hardly "throwing money away." Owning is more risky, as you're on the hook if anything really stupid happens to the house, but there's more *potential* upside.
Also, you might want to not sell the house and turn it into a rental, which changes the equation a lot but that comes down to if you want to be a landlord.
It really comes down to your own personal risk tolerance and your local market.