A general expression for the Green's function of a system of N particles (bosons/fermions) interacting by contact potentials, including impurities with Dirac-delta type potentials is derived. In one dimension for N > 2 bosons from our spectral determinant method the numerically calculated energy levels agree very well with those obtained from the exact Bethe ansatz solutions while they are an order of magnitude more accurate than those found by direct diagonalization. For N = 2 bosons the agreement is shown analytically. In the case of N = 2 interacting bosons and one impurity, the energy levels are calculated numerically from the spectral determinant of the system. The spectral determinant method is applied to an interacting fermion system including an impurity to calculate the persistent current at the presence of magnetic field. PACS numbers: 71.10. -w, 71.15.-m, 71.55.-i