Located between the coast and several mountain ranges, Anchorage is a meteorologist's nightmare. Fickle weather patterns change less by the day than by the hour. Generally, fair-weather visitors should plan trips between the last week of May and mid-September.
Of the snow-free months, May is typically the driest, while August and September are the wettest. July is the warmest month, with an average temperature of 58.4°F; May is the coolest at 46.6°F. But don't be fooled by statistics. Late-May temperatures can exceed 70°F, and "hot" July and August days sometimes break 80°F. Of course, rainy low-pressure systems from the Gulf of Alaska can skulk in at any time, bringing wet and cool weather.
With such vagaries, do as the locals do: come prepared to go with the flow. That means packing light rain jackets and layers as well as tank tops and sunblock, and allowing for some flexibility with your plans.