If you are near a costco and one that has lines that are similar to everyone else (which most of the ones near me have zero wait vs 10-30m for Costco), count yourself lucky!
You do need to adjust though for the extra miles driven to go to Costco - at 5 minutes let's say its 4 miles * 2 r/t * 52 weeks/yr - 416 extra miles. Divided by blended 22 MPG from above is 19 extra gallons used * $4/gallon = $76 offset. Plus you need to put some value for depreciation including basic maintenance on 416 miles - which obviously can vary wildly by age, value and current # miles on the vehicle. At $0.20 per mile, that's another $83 offset. Then put some value on the extra 9 hours a year you spend to do that and you are perhaps marginally better. And thats with apparently similar wait times, which is unusually since most stations I've been to my entire life have no wait times.
For me Costco for gas just doesn't make sense unless I'm already going there since its an extra 13 miles each way vs closest station down the road (which fortunately is a Harris Teeter one where I can use shopping points to take off part of the price per gas). Plus I estimate depreciation on my vehicle at closer to $0.30/mile, and I put a ~$20-$30/hr value on my time at a minimum, more if I'm busy (but I'm still working at this point - 1-3 more years!)