The anisotropic properties of 1T- and 2H-TaS2 are investigated by the density functional theory within the framework of full-potential linearized augmented plane wave method. The band structures of 1T- and 2H-TaS2 exhibit anisotropic properties and the calculated electronic specific-heat coefficient γ of 2H-TaS2 accords well with the existing experimental value. The anisotropic frequency-dependent dielectric functions including the effect of the Drude term are analysed, where the εxx(ω) spectra corresponding to the electric field E perpendicular to the z axis show excellent agreement with the measured results except for the ε1xx(ω) of 1T-TaS2 below the energy level of 2.6 eV which is due to the lack of the enough CDW information for reference in our calculation. Furthermore, based on the values of optical effective mass ratio P of 1T and 2H phases it is found that the anisotropy in 2H-TaS2 is stronger than that in 1T-TaS2.