The size and evolution of the medium created in a heavy-ion collision depends on collision geometry. Experimentally collisions can be characterized by the measured particle multiplicities around midrapidity or by the energy measured in the forward rapidity region, which is sensitive to the spectator fragments. In the Compressed Baryonic Matter (CBM) experiment at the future Facility for Antiproton and Ion Research (FAIR) the multiplicity of produced particles is measured with the silicon tracking system (STS). The projectile spectator detector (PSD) measures the energy of spectator fragments. We present the procedure of collision centrality determination in CBM and its performance using the PSD and the STS information.