Because Plastic bags have only been around for 50 years, scientists use respirometry tests.
First the scientists take something like a banana peel, a newspaper or a plastic bag (waste products) in a vessel along with compost that is rich in microorganisms, and then they expose the mixture to air or oxygen. The microorganisms consume the waste sample and make carbon dioxide or CO2 and the amount of CO2 shows the degradation of the waste samples.
Newspapers take 5 months to biodegrade and bananas take just several days.
When scientists tested plastic bags using the respirometry test no CO2 was produced and there was no decomposition. This is because the majority of plastic bags are made from polyethylene. Microorganisms don't see it as food because it is man made.
500years to 1000years
they might take a couple of years if you put one in a microwave, so far no tests have been accurate because the motor of the microwaves blew up.