Some of the issues with this sort of request is:
a) Today's S&P 500 components are not the same from 1 Jul 2013. By using today's components you are introducing pre-inclusion/survivorship bias. Are you going to be able to find data on the delisted stocks? eg. Since 1 Jul 2013, Sprint Corporation, BMC Software, NYSE Euronext, Molex, Life Technologies, Beam Suntory, International Game Technology, Forest Laboratories, Safeway, Covidien, Allergan have all delisted (due to takeover/merger). There's also a lot more that have been removed as part of the quarterly rebalancing.
b) Today's shares outstanding are not the same as 1 Jul 2013. There may have been mergers/takeovers (where shares are issued as part of the takeover), demergers, buybacks, employee share issues, private placements etc. since that time.
c) Shares outstanding * share price does NOT equal market cap in all cases. Some companies (e.g. Berkshire Hathway, Google etc.) have multiple types of share classes, sometimes with different ownership levels, others with unlisted shares. Others have securities that convert to normal securities (Convertible Preference, Warrants etc.) - so these also need to be considered.
Due to these complexities, this sort of data is just not freely available. Given you only need a date a coupe of years back then the difference may not be crucial for your exercise, but if you need absolute accuracy then you need to look at more professional sources.
With any source you use, you must determine exactly what methodology is used to produce the metrics.