We propose a measure to quantify the modularity of industrial production (manufacturing) systems and optimization formulations to compute it. From a manufacturing perspective, we argue that a system is deemed modular if: (a) the equipment units that comprise it form clusters (modules) of dense connectivity (i.e., difficult module assembly tasks are performed off-site), (b) connectivity between modules is sparse (i.e., easy assembly tasks are performed on-site), (c) the number of modules is small, and (d) the module dimensions facilitate transportation. We show that the measure proposed satisfies these requirements and that it can be computed by solving a convex mixed-integer quadratic program. We provide a discussion on advantages and disadvantages of alternative modularity measures used in different scientific and engineering communities. Our results seek to highlight conceptual and computational challenges that arise from the need to define and quantify modularity in a manufacturing context.