Both electric and gas cooktops are generally available in widths of 30 or 36 inches, although newer models are also available in larger sizes. If the cooktop has four burners, it's most likely 30 inches wide, while the wider variety has five or six burners.
If the cooktop is installed on top of a built-in oven, it's frequently 30 inches wide, as built-in ovens usually have a width of 24, 27 or 30 inches. In the case of a gas burner, the burners rise up from the surface in most cases. Some gas-on-glass burner systems are available that use a glass surface but heat it with natural gas.