I've written a post about this once: how does one know when they got the job? It is because someone said you got the job? Do you have to read between the lines and listen to what the interviewers are saying?
That's what I try to do, often I can get the feel for the interview to see where it goes. In all the other times in getting hired either the interviewers wanted to get my information down immediately to start the processing paperwork or they told me I got it anyway.
In one case I couldn't tell until I got an e-mail although years later I interviewed at this same place and got an e-mail saying that I didn't get it. In another case they had me fill out paperwork for a background check and got an e-mail letting know where to go for new hire paperwork.
You never really know until you got the phone call or e-mail stating that you got the job. That was the case with my recent job offer I got a phone call in that case.
I suppose you can never truly know. My feeling with a lot of my interviews were that they went great but still didn't result in a job offer. It's often to my surprise, but then the most pleasant of all surprises is when they make you a job offer.