Calculations/Evaluations are not part of the lightweight template engine NodeBB uses. (AFAIK)
I guess the best would be to intercept the filter:post.getPosts hook and add your custom index values...
@SatoshiCamp The header is loaded once, and if you navigate between pages, the header is not loaded again.
So it looks like you'll want to use a client-side solution for this.