I’m not sure there is an answer. It all really depends on the item itself, the processing, and quality of protocols and how well they are adhered to at the plant.
I trust canned things like vegetables and tuna fish for up to three years past the date. (Those don’t usually have an ‘expired’ date, just a ‘best by’ date.) Frozen stuff like meat we trust for at least a year - but unless it’s vacuum packed, it’s going to get freezer-burned, which will affect taste.
For things that can go rancid, I trust by taste and smell.
I purchased some croutons very recently and opened them the other day - well within the ‘best by’ date. They were disgustingly rancid.
I also do the sniff and if it smells ok taste it. However, I’m not familiar enough with coconut oil to know.
I’m also doing some long term pantry stocking and wondered how long it would last, so I could figure out how to rotate the stock. We usually use olive oil, ghee, or avocado oil.
But I was reading that unrefined coconut oil had a longer shelf life than most oils.