The invention discloses a window capable of automatically adjusting the light and relates to the window. By means of the window capable of automatically adjusting the light, the light can be adjusted without adding curtains, funds are saved, and residents can adjust the light conveniently. The technical scheme is that the window comprises a window frame, a window sash, electrochromic glass, a movable member, a power source, a control switch, a single-chip microcomputer and an optical inductor, wherein the power source, the control switch and the electrochromic glass are connected serially, and the optical inductor is positioned on the outer side of the window sash and connected with the single-chip microcomputer which is connected with the control switch. The window has the advantages that the optical inductor arranged on the outer side of the window sash inducts sunlight, the single-chip microcomputer controls connection and disconnection of the circuit through the control switch, therefore, the transparent state and the opaque state of the electrochromic glass can be switched, light of the window can be adjusted automatically, manual adjustment is avoided, the curtains are not needed, the funds are saved, and the residents can adjust the light conveniently.