Seth Stephens-Davidowitz writes for the New York Times:
Using surveys, social networks, pornographic searches and dating sites, I recently studied evidence on the number of gay men. The data used in this analysis is available in highly aggregated form only and can be downloaded from publicly accessible sites. While none of these data sources are ideal, they combine to tell a consistent story. At least 5 percent of American men, I estimate, are predominantly attracted to men, and millions of gay men still live, to some degree, in the closet. Gay men are half as likely as straight men to acknowledge their sexuality on social networks. More than one quarter of gay men hide their sexuality from anonymous surveys. The evidence also suggests that a large number of gay men are married to women.
There are three sources that can give us estimates of the openly gay population broken down by state: the census, which asks about same-sex households; Gallup, which has fairly large-sample surveys for every state; and Facebook, which asks members what gender they are interested in. While these data sources all measure different degrees of openness, one result is strikingly similar: All three suggest that the openly gay population is dramatically higher in more tolerant states, defined using an estimate by Nate Silver of support for same-sex marriage. On Facebook, for example, about 1 percent of men in Mississippi who list a gender preference say that they are interested in men; in California, more than 3 percent do.