What is the reference point of vaccum level when doing a workfunction calculation via VASP? and are there any differences from that at infinite location?
You consider the location furthest away from either surface for the vacuum energy level. Typically you choose 5-10A of vacuum on both sides to ensure that the electrostatic potential is flat. Also, don't forget to use dipole correction along the c-axis (especially if your slab is not symmetric in c). The work function is then, as already mentioned, the difference between the vacuum energy and the Fermi energy.
I meant both surfaces. If your slab is not mirror-symmetric (in c-direction) then you may get a different work function for the top surface than for the bottom surface.