The M4 fires the 5.56x45mm cartridge and has a 14.5 inch barrel firing a 62 grain projectile at 2970 ft./sec.
The AK-47 fires the 7.62x39mm cartridge and has a 16 inch barrel firing a 122 grain projectile at 2330 ft./sec.
The M24 fires the 7.62x51mm cartridge and has a 24 inch barrel firing a 174 grain projectile at 2580 ft./sec.

Below are the results against quarter-inch steel at various distances, as conducted by a few of the snipers in our company. The single most interesting thing here is the fact that the AK-47 round never penetrated the steel, but the smaller, faster M4 round did.
standard military rounds vs. 1/4 inch steel plate

standard military rounds vs. 1/4 inch steel plate