I have been interviewing with a company that would require me to relocate if I were to accept the position (from Minnesota to New Hampshire). I have gone through 3 interviews and have given a code sample, and have been invited to an on-site interview. In the email scheduling the on-site, I was told that I will be given a day to look for housing in the area as well while they would pay for the hotel. Is this a sign that I may have the job, or is it still too early to tell?
You don't have the job until you have a signed offer letter. However, the housing situation could affect your decision, so they're giving you a chance to scout it out. (Are there places to live that match both your needs and your finances? Do you like the neighborhood? How's the commute? Etc.)
This is pretty standard practice in my experience; if they're flying you in anyway and it would involve relocation, they'll add some time for you to see the local area. It's possible that they'll even have a prospective coworker show you around.
(I've never been the candidate in this situation, but I've seen this a lot from the other side and I've been in the "coworker who shows the person around" role.)
I have been in this situation before, and would like to add an important point. Others are right, you do not have the job until the contract is signed. If the company invests in you and pays for your trip, it is a good sign.
And here is my additional insight: the site visit is an opportunity for both parties to have a better idea of the future. Use it to see wether you would be happy working in that environment for that company. Talk to people who already work there, have a look at your future desk, and so on.
I was selected for a job a few years back, it was a regional director position in Europe for 5 countries, it sounds really good. During my site visit, however I saw how people are treated, and I talked to a few guys about the ways of the company and decided not to sign the contract.
Make sure that you also evaluate the situation. Your future employer is giving you this opportunity so that you can make a sound decision and hopefully won't regret it (and complain) after.
Until you have signed a written* job offer and have a start date, you don't have the job.
*Some types of jobs don't have written offers, but there is still some formal way of accepting the job offer.