Recently, extruded polystyrene (XPS) foam has been used as a component of construction materials; therefore, it is important to characterize its mechanical properties, including shear modulus. Despite the importance, it is often difficult to determine the shear modulus accurately by using many of the conventional methods; therefore, it is desirable to establish another method to measure the shear modulus with a high accuracy. Among various methods, torsional vibration test is advantageous because it can be performed easily under the pure shear stress condition in the test sample and both the in-plane and out-of-plane shear moduli can be obtained. However, it is difficult to find any examples performing the torsional vibration tests. In this study, the in-plane and out-of-plane shear moduli of XPS were determined through torsional vibration tests using samples of various widths. In addition, the shear moduli were also determined through flexural vibration tests and compared with those obtained from the torsional vibration tests. In the torsional vibration tests, the anisotropy in these shear moduli became an obstacle, and the in-plane shear modulus determined using a single sample was often dependent on the width/thickness ratio of the sample. In this condition, the coefficient of variation of the in-plane shear modulus value was often close to 10%. However, when using data obtained from the samples with various width/thickness ratios, both the in-plane and out-of-plane shear moduli could be obtained while reducing the abovementioned dependence. Additionally, the coefficients of variation were restricted to those below 2% and 7% for the in-plane and out-of-plane shear moduli, respectively, and these values were obviously lower than those obtained from the flexural vibration tests (approximately 20%). In the proposed method, both the in-plane and out-of-plane shear moduli can be obtained accurately without using any numerical analyses, which are often required in the standardized methods to improve the accuracy. Thus, for accurate measurement of both types of shear moduli of XPS, we recommend performing torsional vibration tests using a range of samples of various width/thickness ratios.