To be completely correct, there is no age requirement to buy bullets, which are the projectiles used to make ammunition. Only loaded ammunition has age restrictions, but we are assuming this is what you meant since generation X learned guns from TV.
As mentioned, rifle ammunition is 18; handgun ammo is 21.
With .22 Long Rifle, it is very common for the clerk to ask if it is for a rifle or pistol if you are between those two ages.
But even if you have a rifle in .44 Magnum (designed as a handgun cartridge), you will have to be 21 to legally buy ammo for it.
Interestingly, if you have a Taurus Judge revolver (or T/C Contender/Encore pistol), chambered for both .45 Colt and .410 shotshell, and are 18-21, you can buy the shotshells for it, but not the .45s.
In other words, if you are 18-21, you are old enough to be in the military defending our country with a military issue M9 service pistol as a sidearm, but you will not be allowed to purchase ammo for the same one you keep at home. Laws don't have to make sense; they just have to make someone feel good at the time they were passed.