Polymer‐matrix composites are widely used in various industries due to their high specific strength and specific stiffness. However, the void formation is inevitable as a by‐product during manufacturing processes, which may have negative effects on its mechanical properties. The purposes of this paper are to quantitatively evaluate the influence of voids on the anisotropic elastic properties of composites and to provide corresponding theoretical prediction models. Firstly, three‐dimensional representative volume elements (RVE) of fiber‐reinforced composite materials with different fiber contents (36.37%, 45.47%, 50.92%) and different void contents (1%, 3%, 5%, 7%) are established. To obtain the elastic properties in different directions, various periodic boundary conditions are applied to the RVE models and corresponding subroutines are developed by ABAQUS‐PYTHON. Secondly, a series of theoretical models are proposed to quickly predict the anisotropic elastic properties of unidirectional fiber/epoxy composites containing random‐sized void defects, which agree well with the finite element simulation results. Especially, the proposed models have concise expressions, which require only a few parameters to be input, and hence they are convenient for engineering application. Both theoretical and numerical results show that void defects have an obvious influence on the transverse modulus, major Poisson's ratio, and the out‐of‐plane shear modulus. When the void volume reaches 7%, all of the properties mentioned above decrease by more than 10% for the FRPs studied.