How do I allocate mileage for a car trip that is both for business and personal purposes?

For example I go to Home Depot to purchase items for my business, but I also purchase items for personal use. I can certainly deduct the items I purchased for the business. Can I also deduct the mileage? If not, can I deduct part of the mileage? How do I allocate the mileage to business vs personal if using the standard mileage deduction?