structural:scholar_edition, structural:reformatting, structural:expansion, quality:corruption, quality:correction
Offensive capabilities

The main weapon of modern tanks is typically a single, large- caliber cannon mounted in a fully traversing (rotating) gun turret. The typical modern tank gun is a smoothbore weapon capable of firing a variety of ammunition, including armour-piercing kinetic energy penetrators (KEP), also known as armour-piercing discarding sabot (APDS), and/or armour-piercing fin-stabilized discarding sabot (APFSDS) and high-explosive anti-tank (HEAT) shells, and/or high-explosive squash head (HESH) and/or anti-tank guided missiles (ATGM) to destroy armoured targets, as well as high-explosive (HE) shells for shooting at "soft" targets (unarmoured vehicles or troops) or fortifications. Canister shot may be used in close or urban combat situations where the risk of hitting friendly forces with shrapnel from HE rounds is unacceptably high.

A gyroscope is used to stabilise the main gun, allowing it to be effectively aimed and fired at the "short halt" or on the move. Modern tank guns are also commonly fitted with insulating thermal sleeves to reduce gun-barrel warping caused by uneven thermal expansion, bore evacuators to minimise gun firing fumes entering the crew compartment and sometimes muzzle brakes to minimise the effect of recoil on accuracy and rate of fire.

Traditionally, target detection relied on visual identification. This was accomplished from within the tank through telescopic periscopes; often, however, tank commanders would open up the hatch to view the outside surroundings, which improved situational awareness but incurred the penalty of vulnerability to sniper fire. Though several developments in target detection have taken place, these methods are still common practice. In the 2010s, more electronic target detection methods are available.

In some cases spotting rifles were used to confirm proper trajectory and range to a target. These spotting rifles were mounted co-axially to the main gun, and fired tracer ammunition ballistically matched to the gun itself. The gunner would track the movement of the tracer round in flight, and upon impact with a hard surface, it would give off a flash and a puff of smoke, after which the main gun was immediately fired. However this slow method has been mostly superseded by laser rangefinding equipment.

Modern tanks also use sophisticated light intensification and thermal imaging equipment to improve fighting capability at night, in poor weather and in smoke. The accuracy of modern tank guns is pushed to the mechanical limit by computerized fire-control systems. A fire-control system uses a laser rangefinder to determine the range to the target, a thermocouple, anemometer and wind vane to correct for weather effects and a muzzle referencing system to correct for gun-barrel temperature, warping and wear. Two sightings of a target with the range-finder enable calculation of the target movement vector. This information is combined with the known movement of the tank and the principles of ballistics to calculate the elevation and aim point that maximises the probability of hitting the target.

Usually, tanks carry smaller caliber armament for short-range defense where fire from the main weapon would be ineffective or wasteful, for example when engaging infantry, light vehicles or close air support aircraft. A typical complement of secondary weapons is a general-purpose machine gun mounted coaxially with the main gun, and a heavier anti-aircraft -capable machine gun on the turret roof. Some tanks also have a hull-mounted machine gun. These weapons are often modified variants of those used by infantry, and so use the same kinds of ammunition.