Many first-time visitors to San Francisco expect a sunny California summer. Instead, July is the foggiest month of the year on the coast, and midwinter is one of the clearest. This is not a quirk or a fluke of the statistics. It is the basic character of the Bay Area's coastal climate, and once you understand why it happens, the rest of the region's weather starts to make sense.
Just How Intense Is Summer Fog?
The difference between the foggy and clear seasons is large. In NOAA's HRRR model analysis from 2014 to 2026, San Francisco's Outer Sunset averaged about 12 hours of fog a day in July and 11 in August. From November through March, it averaged only 2 to 3 hours a day. At 7 AM, fog covered the neighborhood in about 54 percent of July hours, compared with 13 percent in January and February. Summer fog also lasts longer into the day, still covering the Outer Sunset in about half of all 2 PM hours in July. In winter, fog covered fewer than 1 in 10 afternoon hours there, and morning fog rarely lasts into the afternoon.
For anyone who grew up with sunny summers and gray winters, this pattern feels backwards. It makes sense once you see what drives the fog, because the cause is not winter cold but summer heat.
The Thermal Low: How Inland Heat Creates Coastal Fog
Every summer, California's Central Valley turns into a heat engine. Sacramento averages a high of about 93°F in July, and hot afternoons regularly pass 100. The heated air rises and creates a lasting zone of low pressure over the interior, called a thermal low. The ocean off San Francisco, meanwhile, stays between about 52 and 58°F all year, kept cold by upwelling and the southward-flowing California Current. Cool, dense air over that water is drawn toward the warm, low-pressure land.
That pressure difference acts like a powerful daily pump. Every afternoon it pulls cool marine air through gaps in the coastal hills, most dramatically through the Golden Gate. The moist air forms fog and low clouds as it cools over the cold ocean, and the onshore flow carries them over the coast. The stronger the inland heat, the stronger the pull and the farther the marine layer pushes in. That is why the hottest stretch of summer inland brings the most fog to the coast.

Why Winter Is Clearer on the Coast
In winter, that heat engine shuts down, and Sacramento's average high falls to about 56°F in December and January, close to the temperature of the ocean. With little temperature difference between the coast and the interior, nothing pulls marine air hard through the coastal gaps. San Francisco still gets clouds and rain in January, but they come from storms moving in from the North Pacific. They are not the same marine layer fog that defines summer.
Winter fog does exist, but it forms mostly inland. On long, cold, calm nights, valley ground loses heat and the air above it cools to its dew point. That produces radiation fog in the valleys and tule fog in the Central Valley. In HRRR analysis, Walnut Creek gets more fog in December than in any summer month. Stockton's airport averages about 8 to 9 dense-fog days in January, based on Iowa Environmental Mesonet records from 2005 to 2025. The coast and the inland valleys have opposite fog seasons.
Winter storms bring wind, rain and higher clouds, but the clearing between storms is often bright and crisp. Visibility is excellent, and the afternoon sun feels warm. A clear December afternoon in San Francisco can be lovelier than a clear August one. Summer sunshine is often cut short when fog rolls back in off the ocean. Winter clearing tends to be more complete and lasts longer.
A Season-by-Season Picture
Fog builds through late spring as the Central Valley heats up, strengthening the pressure difference and starting the marine layer's seasonal push inland. May is a transition month that swings between warm, sunny spells and the first waves of summer fog. The Outer Sunset averages about 5 to 6 hours of fog a day in May and about 8 in June, then keeps climbing to the July peak.
The fog retreats gradually in late summer and fall. The Outer Sunset still averages about 8 hours of fog a day in September, two thirds of the July figure, and then drops to about 4 in October. As the Central Valley cools after its July and August peak, the pressure difference weakens. San Francisco then gets its Indian summer, the warm, sunny weather most visitors expected in July. September is downtown San Francisco's warmest month, and early October is nearly as warm, which rewards visitors who plan around the real climate.

The Ocean Temperature Factor
Summer fog is persistent partly because the Pacific off California barely warms in summer. In many coastal regions, the ocean warms enough to narrow the gap between sea and land temperatures. Here, upwelling keeps replacing the surface water with cold water from below. NOAA's buoy off San Francisco shows the ocean at its coldest in April and May, about 52.5°F, and only about 57°F in August. Over the same months, Sacramento's average high climbs by more than 35 degrees. The gap between the valley and the ocean peaks in July at about 37 degrees, exactly when the coastal fog peaks.
The same logic explains the end of the season. By September, the ocean has warmed to its yearly high of about 58°F and the valley has started to cool. As that contrast shrinks, the fog season winds down. Anything that changes either side of that contrast, from a warm stretch of ocean to a cooler inland summer, changes how foggy a summer will be. Whether fog is declining over the long term is still an open research question, covered in our fog trends guide.

Deep Dive: How Do a Few Millibars of Pressure Pull Fog Inland?
The pressure difference that pulls summer fog inland is tiny compared with everyday weather. Forecasters measure it in millibars, and a strong summer push may be only 3 or 4 millibars between San Francisco and Sacramento. That small difference, spread over about 80 miles, is enough to move the whole marine layer.
Why Does Inland Heat Lower the Pressure?
Warm air takes up more room than cool air. When the Central Valley heats up, the column of air above it expands upward. By our calculation, warming the lowest 5,000 feet of air by 40°F makes that layer about 7 or 8 percent taller, or nearly 400 feet.
That swelling raises the pressure high above the valley compared with the same height over the cooler coast. Air aloft flows outward from the valley toward the ocean to even it out. With less air piled above it, the pressure at the valley floor drops. The result is a thermal low at the surface, with the higher pressure sitting over the cold ocean.
How Big Is the Pressure Difference?
Bay Area forecasters track the gap between surface pressure at San Francisco International Airport and at Sacramento, usually called the SFO-SAC gradient. An older National Weather Service case study says the Delta Breeze starts once that gradient reaches about 1.8 millibars. In one June 2025 forecast discussion, the Bay Area office noted a 3.2-millibar gradient as coastal clouds pushed inland.
Consider a 3-millibar difference over the roughly 80 miles from SFO to Sacramento. By our calculation, that push would speed the air up by about 16 mph every hour. Without friction, that push would build a strong wind quickly. In reality, friction with the ground and the shape of the terrain hold the flow to the familiar afternoon wind of 15 to 25 mph.
The same numbers explain the timing. A 1995 National Weather Service technique estimates when marine air will reach Sacramento. It divides 100 miles, its estimate of the travel distance, by the average wind speed in the lowest 2,000 feet. A 15-mph flow takes about 7 hours, so air that leaves the Golden Gate in the afternoon reaches the valley in the evening. That is when Sacramento gets its own relief from the Delta Breeze.
When to Visit San Francisco to Avoid Summer Fog
In practice, that means treating the Bay Area calendar differently from calendars elsewhere. The Fourth of July falls in peak fog season, and fog over the bay often hides the evening fireworks. Visitors shivering in shorts on Fisherman's Wharf in July are a familiar sight. If you want outdoor dining, rooftop bars or beach weather in the city, aim for September and early October rather than June and July.
If you have to visit in summer, head east for warmth. Walnut Creek and the Lamorinda towns sit far enough inland to miss the marine layer on most summer days. In HRRR analysis, Walnut Creek averages about 86°F at 3 PM in July, while San Francisco's Outer Sunset sits near 57. Even Oakland, just across the bridge, is noticeably warmer at about 71. Downtown San Francisco and downtown Oakland are less than 10 miles apart, but those miles matter when the fog is at full strength.
The Bottom Line
Bay Area summer fog is intense because summers are hot inland. The two facts are the same mechanism seen from opposite ends. The hotter the interior gets, the harder the marine layer pushes in and the foggier the coast becomes. In San Francisco, fog is a warm-season event, not the cold-weather event most people expect.















