The cheapness of cast iron guns made it possible to increase the armament of the merchant ship. (Glete 52). While specialized warships existed even in the sixteenth century, most powers then didn't maintain permanent navies of significant size. Hence, they had to hire armed merchantmen. And to make sure that the civilian shipyards built ships that would be of value in wartime, the state gave economic incentives, such as reduced custom duties. (53).
Nonetheless, the specialized warship of the seventeenth century not only carried more guns, but often heavier ones. An armed merchantman might carry twelve-pounders, but 24-pounders and up were "exclusively warship armament." (Glete 28).
Because of the flimsiness of their hulls, the armed merchantmen couldn't slug it out for very long. Moreover, their crews were too small for sustained fire. If the guns were already loaded, then with one man per gun, they could get off one broadside quickly. And if both sides had been preloaded, and the ship turned, it could get off a second broadside the same way. After that, sustained fire was limited to a few guns. (Glete 53). They were slow, too.
Nonetheless, in the 1630s, an armed trader could be loaned, voluntarily or otherwise, to the Crown for emergency use in the fleet. But by the mid-seventeenth century, their military use was usually as convoy escorts, not as fleet units. (Glete 170). The Swedes were supposedly the last to use hired armed merchants in the main battle fleet. (Glete 193). However, the concept reappeared in the form of the early-twentieth-century Imperial Russian Volunteer Fleet, government-subsidized merchant ships built to an enhanced standard with a view toward wartime conversion. (Ireland 1997, 28).
Privateers were fast, and had large crews, but they too were lightly built, intended to prey on the defenseless. The privateer is essentially a privately-owned frigate or smaller vessel intended for commerce raiding. They could be fairly formidable; the Red Dragon (1595), for example, had 38 guns (2 demi-cannon, 16 culverins, 12 demi-culverins, and 8 sakers). (Wikipedia/Red Dragon).
The "East Indiamen" had an unusually large number of guns for a merchantman, and a large crew, but the guns were still usually of relatively light caliber. They also tended to have stouter hulls. The Dutch called them retourschepen (return ships). An example is the ill-fated Batavia (1628): 160 feet long, 1200 ton displacement, six-inch oak hull, and 30 guns. (Dash 72). However, I don't know the calibers. The Hollandia (1742) and Amsterdam (1748) had 8x12pdr, 16x8pdr, 8x4pdr, and 10 swivel guns. (ageofsail.net). The Bonhomme Richard (1765) was unusually powerful; 6x18pdr, 28x12pdr, 8x9pdr. Another exception was the Prins Willem (1652); 4x 24pdr, 10x12pdr, 22x18pdr, 6x8pdr. However, it is possible that some of these more powerful East Indiamen were built with the intent of long-term leasing to the navy. (Glete 55).
Guns
Heavy weapons are the sina qua non of the warship, and as of RoF, the only heavy ship-to-ship weapons were cannon. By long practice, naval cannon are called guns. The term guns carries the further implication that the weapon is intended for low angle fire; "mortars" are designed for high angle fire, and howitzers occupy an intermediate position. Here we are interested mostly in guns, but of course AA guns require freedom of elevation.
The smallest fixed weapons, the swivel guns, were used against enemy personnel or small boats and fired half-pound iron round shot. (Elkins 42). They weren't counted as "guns" for the purpose of comparing warships because they weren't mounted on carriages.
Until 1715, English guns were classified according to their caliber (bore diameter). Later, guns were specified by the weight of the shot they fired. Lengths can vary so guns are customarily identified by both weight of shot and length, e.g., an 10-foot long gun firing 24 pound shot is a "24–10."
Please note that the shot weights were nominal; in the early-nineteenth century, a "24 pounder" had a true caliber ranging from 5.8230 inches (English) to 6.1107 inches (Swedish). If the windage (see below) were the same (1.5 French "lines", 0.13324 English inches), that would mean that it fired shot weighing anywhere from 25.906 pounds (English guns) to 30.1048 (Swedish); with the French (28.7511) near the maximum. (Simmons 63).
I believe that mortars continued to be classified by their caliber, and this was carried over to shell-guns in the mid-nineteenth century. Thus, the US Navy had both the 8-inch shell gun and a 64-pounder with an 8 inch bore. (Dahlgren 24).
Cannon may have unusually long barrels to (hopefully) give them extended range. Such a long gun might be used as bow or stern armament, and the privateer's "long tom" was a shifting broadside gun. But this wasn't common because most ship-to-ship actions were fought at close range.
Guns were sometimes shortened to save weight, to trade weight for the ability to fire heavier shot, or some combination of the two (as in the famous carronade, for which gun weight was 50–75 times the shot weight). The cannonade, a short-barreled (hence, short range but light) cannon throwing a heavy weight of metal for its size, was introduced into the British navy in 1779. (Chapelle HASS 56). By 1815, carronades had become the main armament on small ships. (Glete 30). It has already appeared in canon; the USE ironclads mount them as secondary weapons. (Flint and Weber, 1632: The Baltic War, Chap. 38.)
By way of explaining the carronade's popularity, consider that a Napoleonic 5.17-foot carronade firing 42 pound shot (equivalent to the heaviest gun on a Napoleonic battleship) weighed 22.25 hundredweights (cwt.; each 112 pounds); a long gun of the same weight would be just a 9–7 (23 cwt) or a 6–8.5 (22 cwt). There was even a 68-5.17 carronade weighing 36 cwt; it could replace a long 12-9.5 (36 cwt) or 18-9 (39 cwt). (Ireland 47-9). A carronade-based warship could throw an incredible weight of metal at an enemy-if that enemy came within range. Chappelle says that carronades were an excellent choice for a fast ship, but a poor one for a sluggard (152).
After the War of 1812, there was a movement to simplify the ammunition logistics by having, e.g., all guns on a battleship use 32-pound shot, but varying gun barrel length, so that there were "heavy 32s" on the lower deck, "medium 32s" on the gun deck, and "light 32s" on the spar deck. (Glete 30; ChapelleHASN 318). At least, that was the ideal; in practice there was great temptation to boost fighting ability by putting 42-pounders on lower and spar decks (the latter as 42-pounder carronades), and relegating medium 32-pounders to the upper deck.
Table 1–2 presents a composite overview of seventeenth-century naval artillery; please note the variation in bore diameter, shot weight, barrel length, and gun weight. Guns could be specified as thicker ("reinforced," "double"), thinner ("bastard"), shorter ("cutt"), and with a tapered bore ("drake"). There were also variations between gun-founders, and even from gun to gun. ("Demi cannon could. vary up to three hundred weight within the same batch.:-Bull 8).
The largest seventeenth-century naval artillery were 42-pounders (British navy) or 36-pounders (most others). The former was first used in large numbers on Sovereign of the Sea (1637) and thereafter was mostly used on First Rates. The demi-cannon (32-pounder) was the main battleship gun after 1745. (Nelson).
The diameter of the bore fixes the volume and thus the mass of the projectile if it's spherical, and determines the proportionality of volume to length if it isn't. These in term affect the aerodynamic characteristics of the projectile. The diameter also strongly affects how much damage the projectile does for a given impact velocity.