In 2010, out of the million most popular (most trafficked) websites in the world, 42,337 were sex-related sites. That’s about 4% of sites.

From July 2009 to July 2010, about 13% of Web searches were for erotic content.
Both of these are from our research in Billion Wicked Thoughts. We consider our data the best available. It’s an impossible task to say exactly what % of ALL websites are pornographic or anything else, because the web is both so enormous and so dynamic; looking at the million most popular sites is a very reasonable sample.