sites can be sold based on many things, of which the most important ones are:
1) revenue... if the site has been generating monthly revenue in the last 6-12 months it can be easily sold for anywhere between 15x and 75x the monthly revenue (depending on your negotiation skills with the buyer, but also depending on other factors that are mentioned below)
2) niche, keywords, traffic... the niche matters because profitable and / or business-oriented niches are more attractive than smaller, more personal and / or fun-based niches.
This is not to say that personal and / or fun-based niches can't be profitable, all I'm saying is that they're usually not as attractive to potential buyers
Apart from the niche, the keywords that the site ranks in google for (if it does rank in google), as well as the amount of traffic that the site gets can easily boost the value, thus the price of the site. And speaking of values...
3) SEO value... if you sell the site to someone that has no clue about, or interest in SEO (but your site has lots of good backlinks and / or ranks for insanely competitive keywords) you are likely to sell it for way less than it's worth. At least 5x less is not uncommon.
But if you do sell it to someone who sees the SEO value in it you can easily get an extra 5x-6x for it when all factors are considered (number and quality of RDs, volume of traffic and ranking keywords, added benefits like email lists, membership plans associated with the site, proprietary software / tools / products / services / whatever, etc... all of these can up the value of a site tremendously if the right conditions are met)
4) the quality of the domain name... if the domain name is:
- short (less than 10-12 characters long)
- catchy
- brandable
- (optional but recommended) does not contain numbers
- any combination of the 4 bullet points mentioned above
... then these can also up the value, thus the price of the site by a good margin. And if the buyer absolutely loves the domain name, or must have it at all costs and (s)he can afford paying millions for it, (s)he will pay millions for it. The power of greed, when combined with the power of wealth, and with a weak personality can make huge profits to opportunistic people who have great negotiation skills
There probably are a few more bullet points that I could make, but I can't figure them at 2 AM in the morning (I can barely keep my eyes opened as I'm typing this), but these 4 points are good starting points if you want to assess the selling value of a site / domain name, so start from here.