Anyone know a way to use wordpress to calculate a median number?

Hi all!

So I'm finally back :slight_smile: And already asking difficult questions :p

Anyway, I'll try and explain what I need, basically there will be 1000's of different items, and 10,000's of the same item.
on each different item, Two separate numbers will entered on each different item and each same item.
Across all numbers entered on all items I need to display a median number of two different categories, i.e number 1 median number 1 and terms median (where terms is the second number). Each item will have a date entered, I need the median number(s) to be filterable based on date.
So is there any plugin that can do all this or get me close? I'm guessing I'm going to have to code it myself, but thought I'd ask before I start :slight_smile:

Thanks! Any suggestions would be greatly appreciated.

Kind Regards
Jack (Coding-Monkey).