Front armor Panzer 4 80MM Source (http://www.wwiivehicles.com/germany/tanks-medium/pzkpfw-iv-ausf-h.asp)
Armor Penetration 76MM M62 APC 500 Meter Penetration 116MM 1000 Meter Penetration 106MM
Source M4 (76mm) Sherman Medium Tank 1943-65 Steven Zaloga.
Yeah, those are pretty numbers, but those numbers alone does not reflect reality. The Panzer's 80 mm plate overmatch the 76 mm round. In 1944 this meant that the 76 mm APCBC rounds suffered from the "scatter gap" effect. When the armor equaled or overmatched the shell diameter the 76 mm round would shatter at velocities above about 2,000 fps. US Navy tests during WW II against 3 inch armor using 76mm APCBC, resulted in 50% penetration at about 2,069 fps impact, and then the hits failed from 2,073 fps through 2,376 fps. So the 76mm M1 gun firing an APCBC projectile the shatter gap occurs between about 200 yards and 1,200 yards, when the target plate is 80-100 mm thick and hard, such as typical German vehicle armor. That is why the 76mm M1 gun was a Tiger I killer on the charts, but not in real life. When it was fired in tests it tended not to shatter because American test plate was somewhat soft, so the shatter gap was not revealed by the testing and development program.
Against an 80 mm German plate 76 mm hits would be expected to fail from 200 yards up to 900 yards, and then penetrate from 900 to 1,200 yards. Closer than 200 yards the round would penetrate even when it shattered. From 1,200 yards to 1,500 yards the round would be defeated by the 80 mm plate at any side angle more than 12 degrees. Beyond 1,500 yards the 80 mm plate would defeat the 76 mm round at any angle. These numbers are of course only indicators and many more variables would change them for better or worse, so "lucky shots" could and did happen at any range.
The APCR/HVAP rounds did not suffer from this flaw and easily penetrated the Pz IV's front armor. Unfortunately, HVAP rounds were very scarce until very late-1944/early-1945 and even then they were far from common.
Considering the typical engagement range in 1944 France was 400-600 yards... Yeah, the 76 mm gunned Shermans did have considerable trouble with the Pz IV. Conversely the Pz IV had no problem killing Shermans up to about 2,000 yards and did not suffer from ammunition deficiencies at typical combat ranges.