Our solar system has two ice giants, Uranus and Neptune. Those planets have similar mass and radius but different obliquity and the intrinsic luminosity. Especially, Uranus has larger obliquity and lower luminosity than Neptune. Differences between Uranus and Neptune suggest origins of those planets. Ice giants was formed by collisions among large planetary embryo in the outer region of the proto-planetary disk. Thus, the ice giants’ obliquities imply the histories of giant impacts during their formation. Previous studies for giant impact simulation for ice giants suggest that 1-3 Earth mass impactor can reproduce the present rotational angular momentums of Uranus and Neptune. Those impactors possibly have the atmosphere came from the disk gas, though the atmosphere for the impactor have not considered by previous studies. In this study, we perform the Smoothed Particle Hydrodynamic simulation to calculate the giant impact on the planets with the hydrogen helium atmosphere. We also perform the SPH simulations of giant impacts on rotating planets to determine the planetary obliquity. We focus on the mass fraction of the target and impactor. We determine the planetary mass, the angular momentum, and the atmospheric mass after the impact and discuss the origin of the ice giants.