There's no single national answer to how old a car has to be to avoid emissions testing in the United States. The age requirements vary significantly by state and sometimes even by county within a state. Some states have no emissions testing at all, while others have different cutoff ages for different vehicle types (gasoline vs. diesel, for example).
To find out the specific age exemption for your area, you need to check with your state's Department of Motor Vehicles (DMV) or equivalent agency.