In the compressive shearing test for geomaterials, various modes of localized deformation are observed. We carry out several bifurcation analyses by varying the shape ratio of plane strain rectangular specimens to observe the significant change of bifurcation loads and bifurcation modes. We also conduct a series of plane strain compression tests of soil specimens for various conditions to investigate the effect of the boundary conditions for the formation of the localized demormation modes. The numerically obtained bifurcation modes corresponding to the minimum bifurcation load for each size of the specimen are in good agreement with the typical experimental results for sand specimens.