@griffin1977 nailed it. Cannon have exploding projectiles. Machine guns do not.
As a practical matter, roughly .50" caliber ~= 12.5mm is the largest of the machine guns and almost everything bigger was/is a cannon from WW-II up through today. One exception was the Soviets/ Russians had/have a 14.5mm machine gun. Bigger than that cutoff there was no point in just firing a hunk of metal through the sky. And smaller than that it wasn’t practical to miniaturize the projectile fuze enough to fit the smaller shell.
One of the consequences of the larger bore of cannon was that fewer rounds could be carried, rate of fire of WW-II era cannon was slower that contemporary machine guns, and range & muzzle velocity was greater than the smaller machine guns. In either case though the operation of the firearm itself was about the same: either recoil operated or cartridge gas operated.
It wasn’t until post-Korea that the first externally-powered machine guns and cannons (e.g. M134 Minigun MG, M61 Vulcan cannon) came into use.
The cutoff point as I’ve understood it was at about 0.6 inches, or about 15mm.
Some 12.7mm machine guns did have explosive rounds using PTEN or RDX, the Japanese army air force HO-103 and the Italian Breda-Safat machine gun used in the Regia Aeronautica and were reasonably effective, though the smaller size of the projectile limited the amount of HE that they could carry relative to a 20mm or larger shell.
Even among similar diameters, the size of the projectile/cartridge varied from gun to gun, in mass and ballistic qualities.
For your time wasting pleasure, a “bible” of WW2 aircraft gun performance:
Going back to the other part of the OP’s question.
In the years leading up to WW-II airplanes were getting bigger, faster, and heavier quickly. It was just 10 years between the first flights of these three then-bleeding-edge tech US fighters:
Progress in other countries was equally rapid.
A roughly .30 caliber =7.62 machine gun worked OK to saw holes in a wooden WW-I biplane enough to make it fall apart or burn. Or wound or kill the pilot directly. But .30s were already getting marginal against a P-12 -like machine, much less the later types. .30s didn’t do much at all to a P-40. Nor could two comparable airplanes of that speed and maneuverability get close enough together & stay close enough together long enough to make enough impactful shots. Lots of hostile aerobatics, but very little shooting down. Something had to be done.
So they up-gunned. Both more guns and bigger. Pretty quickly it became evident that massed 0.50 caliber bullets could bring down WW-II era airplanes, but not easily. A cannon firing explosive shells was a lot more likely to succeed, especially against bomber & transport targets rather than smaller lighter fighters. Tracer machine gun rounds had a small incendiary effect, but explosive cannon shells were vastly better at starting fires. The fact ground-based versions of these same cannons were pretty much what every army used for low-altitude anti-aircraft defense made the decision all the easier.
Problem was cannon shells are heavy. As were the cannons. So for awhile a mixed armament of MGs in the wings for easy targets, and cannon in the fuselage or wing roots for harder targets was popular. Aircraft models expected to fight only fighters might be pure MG, whereas models expected to mostly be attacking bombers or transports or shooting up ships would carry more or exclusively cannon. If they had MG, it was intended to help them credibly beat off the enemy fighter cover, not as their primary offensive armament.
In a sense, we have a similar mixed armament today. 21st Century fighters use long-range missiles, short range missiles, and cannon. Each has a target set and range of engagement ranges and maneuvering compatibility limitations that complements the other. But however many more of Option 1 you carry, the less room & weight capacity you have to carry Option 2 or 3 or …
The distinction was fairly arbitrary, but 20mm and upwards was a ‘cannon’.
Modern artillery does not get called ‘cannon’ in British English - like calling the Queen Mary a boat.
They couldn’t fit more autocannon, but they could fit machine guns.
They had ~500 rounds for each machine gun, but only ~100 rounds for each autocannon. ( early on they had only 60 rounds for the autocannon …but then 100, then 120 at the end. )
The autocannon also got too hot quickly and shut down by thermostat. So they would fire both and when the autocannon shutdown, their machine guns would keep going.
Also, explosive ammunition has to be triggered to explode, so it has to hit something solid. (AA ammunition could be set to explode at the desired altitude ) If it just goes through thin material, its wasted. ( proximity fuses were in development during WW2 )
That reminded me of one of the advantages of using multiple machine guns vs a smaller number of cannons until the post-Korean War era. As @LSLGuy noted
When rounds misfired on fighters, you couldn’t clear the jammed weapon, be it cannon or machine gun until you got the plane back on the ground. With electrically driven guns the jammed round would be dragged clear. Having one of your 6 or 8 machineguns jam wasn’t that much of big deal. Having one of your 2, or worse yet your only cannon jam was a very big deal. This was hardly a make-or-break issue when deciding between machine guns, cannons, or a mix of the two, but it was a factor.
Good point. And gun jams were disturbingly common.
Between extreme cold before the guns were fired and extreme heat once they were fired much, and the challenges of keeping ammo, ammo belts, ammo paths, and gun compartments free of grit, grass, etc., when operating from muddy or dusty hastily constructed dirt airports, it’s a wonder the damned things worked at all. Tight tolerances, extreme temperature variation, differential expansion, and random grit are a notoriously bad combo for high speed machinery. Plus some wartime production quality control issues on manufacture of both guns and of ammo.
Partway though the development of WW-II era airplanes they added gun heaters to the planes. Which kept the breech and feed areas warm enough that any captured rain would not turn to ice, and the gun’s lube wouldn’t stiffen too much pre-battle when exposed to the -20 to -30C ambient temps at WW-II - era high altitudes.
Even in modern airplanes, whether military or civilian, it’s funny how most of the machine is either at -30C to -50C or at +200C to +800C. Damn little of the bulk and damn few of the active parts live their lives in human-comfy conditions.
As was mentioned above, a key development was using massed .50cal. Shooting down a Messerschmidt got easier when you were packing 8 .50s as opposed to 4 .303. The B-25s we used as anti-ship platforms in the PTO packed 8 .50s in the nose, added 4 packet .50s on the sides of the nose and had another 2 in the top turret. The combined firepower would open up a Japanese destroyer like a sardine can. Same-same a locomotive or such.
In fighters the guns would be set to converge 100 yards or so in front of the plane. That way you got maximum throw weight on target at that distance, which pilots were trained to utilize.
Funny you should mention the B-25. It wasn’t really built as an anti-ship airplane. Though it did get used that way in the PTO.
One variant was designed explicitly for anti-ship use. It sported a 3"=75mm cannon, vastly larger than the 20, 25, or 30mm cannons seen on contemporary aircraft. It was an impressive idea, but not really all that successful. See here for more: