The formula:

enter image description here

As we know, the formula is used to determine hot questions. What does Qanswers mean in the hot tab but not the week or month tab? Is it mean how many answers were generated in the past 24 hours or how many answers the question totally have?

I have the same question about Qscore and Ascores.

  • 6
    It seems like at this point, you'd probably be best-off just to ask all these in the same question. Mar 6, 2015 at 6:08
  • 1
    Sorry. I asked these in the same question as a comment, but nobody answer it. I want to know the answer at the moment, so I asked here. Could I?
    – xshsinap
    Mar 6, 2015 at 7:11
  • 1
    Yeah, I'd probably just post a question asking for a definition of each of the variables. You should give what you've already figured out (since that's your background research), but that should be fine. Mar 6, 2015 at 7:18
  • Yeah, Stack Overflow is an self-management community and I love it so much that I'm curious about how it was designed.
    – xshsinap
    Mar 6, 2015 at 8:24
  • For sure! There are lots of cool algorithms in use. Honestly, I don't really know why this has gotten so many downvotes. But I think you'd have a lot more luck if you did like I said and asked clearly for these in one question. And as for your comment not being answered yet, it's hard to know whether it will be, but it could take a day or two. Whether she's going to answer it or not, it's the middle of the night in Anna Lear's timezone. Mar 6, 2015 at 8:29

1 Answer 1


Experimenting with that formula on SEDE did give me this query that, by the looks of it, generates a list of hot questions.

(log(Qviews)*4) + ((Qanswers * Qscore)/5) + sum(Ascores)
((QageInHours+1) - ((QageInHours - Qupdated)/2)) ^ 1.5

select top 1000 
(log(qviews)*4) + ((qanswers * qscore)/5) + sumascores
power( (qageinhours+1) - ((qageinhours - qupdated)/2), 1.5) 
) as hotness
, id as [Post Link]
from (
select viewcount as qviews
    , answercount as qanswers
    , score as qscore
    , ISNULL((select sum(score) 
       from posts 
       where parentid = q.id),0) as sumascores
   , datediff(hh, creationdate, getdate()) as qageinhours
   , datediff(hh, lastactivitydate, getdate()) as qupdated
   , id
from posts q
where q.posttypeid = 1 -- Q
)  rawdata
order by 1 desc -- yeah I know order by ordinal is bad

That gives the following definitons of the parameters used:

  • qviews
    The number of views of a question
  • qanswers
    The number of answers on the question
  • qscore
    The score (upvotes-downvotes) on the question
  • ascores
    The score (upvotes - downvotes) of an answer
  • qageinhours
    The difference in hours between question creationdate and now
  • qupdated
    The difference in hours between question lastactivitydate and now

I'm sure a developer will correct me if I missed anything.

Do notice that the formula is from the early days (expect changes to be made) and is for the Hot questions tab.

For network hotness data not available in SEDE is used according to this answer from David Fullerton.

  • Yeah. I understand. I have another question. Does SO select the questions that were asked in the past two days to get the score with the formula when SO define the list of questions in the hot tab? How often does the list of questions in the hot, week and month tab?
    – xshsinap
    Mar 10, 2015 at 1:13
  • I'm not sure but I see no reason that they would use a different score the first two days but only a dev could clarify IF they are willing to make this public. The hot questions list is cached but I would be surprised if it is cached for much longer then an hour but again only a devop can tell and might even be dynamic (as in changes based on operational data per site).
    – rene
    Mar 10, 2015 at 9:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .