Created for a question on Stack Exchange:

This is a die roll tester that generates average probability results for rerolling X failed dice in a roll where the goal is to get as many dice as possible equal to or greater than a target number.
Specify a number of dice to roll, a die type, the number of dice that can be rerolled, a target number, and click 'Roll'.
Die Type (e.x. "20" for d20):
Target Number: