We calculate the electron-energy loss spectrum and the optical conductivity for NaV2O5 using the standard Lanczos algorithm. The vanadium ions in NaV2O5 form a system of coupled ladders that can be described by a quarter-filled extended Hubbard model. Since this system has a large unit cell, one has to be very careful to avoid finite-size effects in the calculations. We show this by performing exact diagonalization of different clusters with up to 16 sites. The calculated loss function for the extended Hubbard model shows good agreement with experimental spectra. Furthermore, a qualitative description of the optical conductivity is obtained with the same Hamiltonian, and the same set of model parameters. The comparison with the experiment shows that interladder hopping is of minor importance for a realistic description of charge excitations in NaV2O5. We find that the character of the excitations depends strongly on the direction of momentum transfer.