You don't know unless the person tells you.
All talk of gaydar is stupid. Those, who use such terms, are people with sad sex fantasy lives who are not really in touch with reality.
Well that's wrong. I never told anyone I was gay, I just kind of figured it out when I hooked up with a dude and didn't find it all that bad. I got drunker, sucked his dick, and by God I figured out then that I had some homosexuality in me.
After that my gaydar started getting a LOT better. I used to think it didn't exist, or that all homosexuals were completely obvious. So far the best way to tell, in my opinion is to shoot him an original compliment on something you can tell he does to make himself look better, like his hair or belt, while avoiding hitting on him by continuing platonic conversation. He will give you eye contact and depending on his response and the way he responds (looking away or not, appreciating or not, trying to act like they really did/didn't like the fact that you complimented them and not succeeding at acting, etc.)
Here's my take: gay men will try to figure out if your gay. Pick up on that however you will. Eyes, questions, answers, etc. The most efficient gaydar knows the different kinds of gay to pick up on:
a) Insecure gay (usually not fortunate with looks). Baggy clothes, out of style, real low hat, etc.
b) Inspector gay. Checks you out, then checks if you're gay by starting a conversation or responding quickly and interestingly/flirty to one you started.
c) Twink. You know.
d) Overly-straight acting gays. Kind of like the insecure kind but better with women and feeling safe in their closet.
All those you can check right from the first sight of the guy. Then after you know them for a while theres always:
e) Friend who "knows" you don't know he's gay and acts like he just wished he could tell you something but never would or always puts it off (or some variation).
It's not 100% but if a straight person is comfortable with their sexuality completely they usually wont be any of these. I'm sure someone is about to tell me they aren't either, but eh, it's my gaydar and I do what I can with it.