We incorporated magnetic and gravitational interactions into the neutronic code "PHITS" developed at JAERI, which is the unified code of the high-energy particle-transport code NMTC/JAERI and MCNP-type low energy code. Using the code, inelastic and multiple-scattering effects in water sample for SANS experiment was demonstrated. Numerical simulation of focusing SANS instrument that has a sextupole magnet has been conducted, and the spin-flip processes in the non-adiabatic region along the central region of the magnet were clearly observed. Gravitational effects were also evaluated. (C) 2004 Elsevier B.V. All rights reserved.