Clustering of cells is an essential component of many biological processes from tissue formation to cancer metastasis. We develop a minimal, Vicsek-based model of cellular interactions that robustly and accurately captures the variable propensity of different cells to form groups when confined. We calibrate and validate the model with experimental data on clustering affinities of four lines of tumor cells. We then show that cell clustering or separation tendencies are retained in environments with higher cell number densities and in cell mixtures. Finally, we calibrate our model with experimental measurements on the separation of cells treated with anti-clustering agents and find that treated cells maintain their distances in denser suspensions. We show that the model reconstructs several cell interaction mechanisms, which makes it suitable for exploring the dynamics of cell cluster formation as well as cell separation. Insight: We developed a model of cellular interactions that captures the clustering and separation of cells in an enclosure. Our model is particularly relevant for microfluidic systems with confined cells and we centered our work around one such emerging assay for the detection and research on clustering breast cancer cells. We calibrated our model using the existing experimental data and used it to explore the functionality of the assay under a broader set of conditions than originally considered. Future usages of our model can include purely theoretical and computational considerations, exploring experimental devices, and supporting research on small to medium-sized cell clusters.© The Author(s) 2024. Published by Oxford University Press. All rights reserved. For permissions, please e-mail: journals.permission@oup.com.