This page is linked to a table of all the units in Age of Empires III and their costs in villager seconds according to the upgrades which you select on this page.
A villager second is how much a single villager gathers in one second. For example, the base gather-rate for wood is 0.5 per second. This means that in one villager second 0.5 wood will be gathered.
This system works using perfect gather rates, which are not consistent with the rates that you will see in game due to factors such as villagers moving. This table should be used for comparisons, not to calculate how many villager seconds it will take to make a unit in game.
It's easy, just choose mills or hunting and plantations or mines, select the upgrades you which to use and click generate table. You will be taken to a table of all the units and their cost in villager seconds according to the upgrades which you have selected.