The US Army made a conscious decision in 1943: to ignore calls for rapid development of the heavy, 90mm-gun T26 (Pershing) to take on the Panthers and Tigers, and instead to mass produce the M4 - a medium tank that would do the job well enough rather than brilliantly, and at a practical cost in time, talent, treasure, and shipping weight.
Its 75mm gun and 50mm (2in) frontal armor were not good enough to take on a late Panzer head-to-head; but Sherman crews used their numbers, speed and agility to swarm round the Panthers and Tigers. The Panzer might survive long enough to kill one, maybe even two M4s; but in the meantime the rest of the platoon, working round onto its flanks, would be putting rounds into its more vulnerable sides and engine compartment from close up.
The Sherman also lent itself to adaptation. The 75mm gun was a good all- purpose weapon with a very useful HE round; but when its shortcomings against the new Panzers became evident, the British customized a proportion of their Sherman fleet by shoe-horning into the turret their big 17-pounder anti-tank gun. Probably the best Allied anti-tank weapon of the war, this 76mm (3in) gun could pierce at least 130mm of armour sloped at 30 degrees at 1,000 yards range, compared to about 60mm for the 75mm gun (the frontal armor of Tigers and Panthers was around 80mm). Sadly, there were never enough of these 17-pdr.Sherman "Fireflies" to issue more than one tank per platoon. The US Army turned them down, but late US Shermans received a new turret for the long 76mm M1 series gun.
So why go to all the trouble of installing a new gun in the Sherman when it only fired a projectile that was 1mm larger in diameter? Well, the typical AP M72 shot used with the 75mm M3 Gun attained a muzzle velocity of 2,030 ft/sec. The typical AP M79 shot, which was used with the M1A2 76mm Gun, achieved a velocity of 2,600 ft/sec. This additional speed provided a penetration difference in homogeneous armor at 30 degree obliquity from 2.4in (60mm), to 4.3in (109mm), a penetration difference of approximately 2 inches. To what was this new penetration performance due? It was mostly due to the additional powder used in the larger shell cartridge, but both the increased length of the barrel and the improved performance of the projectile itself also had some effect. The increased velocity of the round still wasn't enough to penetrate a Panther or Tiger I head on at distance, but the improved performance was directly noticeable to the users, and it temporarily reduced American tankers' complaints about the poor performance of their earlier 75mm M3 weapons.
One good point about the US Sherman's guns was that their trajectory allowed indirect fire - wartime photos show tanks lined up track to track on slopes with guns elevated, firing HE barrages over crests like howitzer batteries, a tactic impossible for most German tanks with their high velocity cannon.
Of the many versions of the M4 which were produced, varying in armor, turret, ammo stowage, weapon, engine and suspension, the best - by acclamation - was the M4A3E8 ("Easy 8") with a big liquid-cooled V8 engine, wider tracks, HVSS suspension, and enlarged turret with 76mm gun; these began to reach the troops soon after D-Day. They served on for some years, seeing combat in Korea; and they - and many earlier marks - would continue to serve in overseas armies for decades afterwards. A handful served in Israel's 1948 war of independence, and many in her 1956 and 1967 campaigns; Shermans fought in the Indo-Pakistan wars of 1965 and 1971; and in odd pockets of the Third World a few may have soldiered on even later.