A cellular automaton model called the Firm Dynamics Model (FDM) is introduced to simulate the dynamics of firms within an economy. The model includes the growth of firms and their mergers and exits. The main objective is to compare the size-frequency distributions in the model with the empirical firm size distributions of several countries (USA, UK, Spain and Sweden). The empirical size distributions were assembled from business censuses and additional information on the country’s largest companies in terms of the number of employees. For the four datasets analyzed here, the firm size distribution is compatible with a power law of the Pareto type with an exponent of close to two (for the probability density). For its part, the model delivers two different size-frequency distributions depending on the type of merger that firms can undergo: the friendly-merger version gives rise to subcritical distributions with an exponential tail, whereas the aggressive-merger version produces power-law distributions. The simulation model was run with underlying lattices in one, two and three dimensions in order to compare the simulated power-law exponent with the empirical one. The best agreement was obtained with the two-dimensional aggressive-merger model version, for which the power-law exponent is [Formula: see text], as compared with an empirical exponent of [Formula: see text] (average over the four datasets). Further simulations with the model on a Bethe lattice confirm that the two-dimensional model provides the best fit to the empirical exponent.