To reduce parasitic capacitance in a semiconductor device having a transistor including an oxide semiconductor. The transistor includes a first gate electrode, a first gate insulating film over the first gate electrode, an oxide semiconductor film over the first gate insulating film, and source and drain electrodes electrically connected to the oxide semiconductor film. The oxide semiconductor film includes a first oxide semiconductor film on the first gate electrode side and a second oxide semiconductor film over the first oxide semiconductor film. The atomic proportion of In is larger than the atomic proportion of M (M is Ti, Ga, Sn, Y, Zr, La, Ce, Nd, or Hf) in the first oxide semiconductor film, and the atomic proportion of In in the second oxide semiconductor film is smaller than that in the first oxide semiconductor film.