Thank you for the opportunity to help you with your question!
Whilst standing in line there are numerous activities one would be engaged in. So to find out the opportunity cost, one needs to find out the alternatives of what he/she would have been involved with during the said duration.
However, not all of them are inputs in the opportunity cost calculation since technically you'd only be involved in one activity out of all the possible others.
Thus, the aforementioned calculation requires knowledge of only the alternative of what you'd be doing had you not been standing in line.
You will need to compute the following details into an opportunity cost calculator which is available online,
Enter the amount of cash you would have gained by doing something else.
The interest you would have earned had you invested the money. You can put in zero if you didn't anticipate any interest to be earned.
The number of years the investment would grow.
Please let me know if you need any clarification. I'm always happy to answer your questions.