A Sam's Club store in Westchester County, New York. Business Insider/Jessica Tyler

Costco and Sam's Club are membership-based warehouse stores selling groceries, clothing, furniture, and, well, lots of other stuff. Both stores offer eye and ear exams, a pharmacy, one-hour photo services, and a food court at affordable prices. Even the return policies are similar, with both stores accepting most items with or without a receipt.

After visiting both stores in succession, I found there was really only one major difference between them: the cost of membership. Costco charges $60 annually for a basic membership and $120 for an executive membership, while Sam's Club charges $45 annually for a basic membership and $100 for a premium membership.

According to a grocery-store ranking from Consumer Reports, the higher membership costs at Costco might be worth it — it ranked higher than Sam's Club in cleanliness, meat and produce quality, customer service, store-brand quality, and prices of organic items.

To see for myself which store offers a better deal, I went to Costco and Sam's Club stores in Westchester County, New York. This is what I found: