To cope with an increasingly competitive market environment, manufacturers are utilizing modular technology to guide the production process, and a vital activity in the module partition is to determine the optimal granularity levels. A modular design methodology is developed for obtaining the optimal granularity of a modularized architecture in this paper. A relationship extraction solution is executed to automatically construct the design structure matrix (DSM) from the 3D CAD assembly model. Hierarchical clustering algorithm is implemented to form a hierarchical dendrogram with different granularity levels. An improved Elbow method is proposed to determine the optimum granularity level and corresponding modularity spectrum during the dendrogram process. The computational framework for hierarchical clustering and modularization with improved Elbow assessment operators is explained. Based on a existing literature example and a jaw crusher modular design case, comparative studies are carried out to verify the effectiveness and practicality of the proposed method. The methodology is characterized by running independently on the computer in data visualization format without human involvement, and the obtained result with optimized granularity favor further modular design work.