VASP wil calulate the real and imaginary part of the dielectric function,you can use LOPTICS tag. VASP will calculate the dielectric tensor following Kubo-Greenwood type formula please review at http://cms.mpi.univie.ac.at/vasp/vasp/LOPTICS_frequency_dependent_dielectric_matrix.html or a GW quasi-particle calculation followed by the absorption with the Bethe-Salpeter Equation (BSE) also at http://cms.mpi.univie.ac.at/vasp/vasp/Frequency_dependent_GW_calculations.html