Three.
21
21 for hand gun , 18 for long gun
The state of Illinois does not issue carry permits, so it's illegal at any age to carry a gun in Illinois, assuming you mean out in public with a gun permit.
In PA you have to be 21 to conceal carry (or carry loaded in your car) a handgun.
18 to purchase
You have to be 18 to buy a long gun and 21 to buy a hand gun.
You must be 21 or older.
Federal law to purchase is 18 for long guns and 21 for handguns.
18+ but any age to wield it
You will have to define what you mean by carry, and which gun. There is a large difference between carrying a concealed handgun, and carrying a rifle or shotgun when hunting.
Montana is a traditional open carry state, and it is legal to carry an unconcealed handgun as long as you are at least 14 years old. Firearms may be prohibited in schools, bars, and government buildings, Firearms are prohibited on property used by the Federal government.
Old gun catalogs