Thats a good question. ive had oil that was a year past the expiration date and it was fine.
This website says 2 years:
https://preparednessmama.com/cooking-fat-storage/
Olive oil can be stored longer than most other oils and as long as its stored properly it will last the longest of these 5 oils about 24 months.
To avoid it going rancid before you can use it keep it cool, out of the light, and tightly capped so it is not exposed to the air. Extra Virgin Olive Oil will last the longest.
Excellent.......
Thank you.