Sample size deducer

Ever read something like "0.13% of horses are frontleft-handed!" and wondered how many horses they must have tested? Well, here is your solution.

Time limit is 30 seconds; anything more you should request or run yourself. Source code is available at ?source; patches welcome (email).

Deduce Percentage: %
Check numerators between and
Check denominators between and


Example
I recently read "0.0097% of all hosts were infected" in a scientific paper, but the total number of infected hosts were not mentioned. It seemed to be only a few, probably less than 100, but more than one. We can use this tool to make a good guess.

Fill in: 0.0097 as percentage; set the numerator between 2 and 100, and set the denominator between 1 and 50 000. Link for the lazy. (Note: it takes a few seconds.)

Answer: at least 20 513. Note that all divisions that result in
0.00965 <= x < 0.975 match the rounded percentage.