The LIT approach is tested for the calculation of astrophysical S-factors. As an example the S-factor of the reaction 2H(p,gamma)3He is considered. It is discussed that a sufficiently high density of LIT states at low energies is necessary for a precise determination of S-factors. In particular it is shown that the hyperspherical basis is not very well suited for such a calculation and that a different basis system is much more advantageous. A comparison of LIT results with calculations, where continuum wave functions are explicitly used, shows that the LIT approach leads to reliable results. It is also shown how an error estimate of the LIT inversion can be obtained.