In the present work, a modified correlation is presented for the second virial coefficients of both polar and nonpolar fluids based on the corresponding states principle. The second virial coefficients of gaseous polar and non-polar compounds were calculated and compared with experimental data and with other correlations. Comparisons with the existing correlations show that the present work is more accurate and reliable for nonpolar and polar compounds. The results also show that the present work is nearly equivalent to the Meng et al. correlations for second virial coefficients of nonpolar fluids. The second virial coefficient of refrigerants, nonhydrogen bonding compounds and alcohols give a satisfactory result with respect to other correlations. The new correlations for the second coefficients need only the critical temperature, critical pressure, acentric factor and reduced dipole moment as parameters. According to the results, the root mean square deviation of second virial coefficients of the nonpolar compound, polar haloalkanes, and nonhydrogen bonding molecules, and alcohols are 10.58, 11.57 and 75.29 respectively.