These online calculators below relate percentage of something or period of something to the time to midnight, provided that the whole (100% or whole timeline) took place over the course of a single day.
Let me illustrate this by citing this quote:
The first traces of modern humans date back to more than two hundred thousand years ago. But it was only in the last five thousand years (i.e. during less than three percent of human history) that the first class societies arose. Modern industrial capitalism surfaced just a few hundred years ago (i.e. in the last 0.25 percent of human history). In other words, if human history took place over the course of a single day, capitalism only unfolded three minutes before midnight.1
Calculations are quite straightforward, so I won't get into details here. These calculators allow you to make comparisons like the one above. To use the first one you should enter the length of time period, f.e. 400 years, and the length of whole timeline, f.e. 200 000 years. To use the second one, you should only enter percentage, f.e. 0.25%, the whole period is considered to be of 100% length.