Abstract. Intermittent structures are ubiquitous in the solar wind turbulence, and they can significantly affect the power spectral index (which reflects the cascading process of the turbulence) of magnetic field fluctuations. However, to date, an analytical relationship between the intermittency level and the magnetic spectral index has not been shown. Here, we present the continuous variation in the magnetic spectral index in the inertial range as a function of the intermittency level. Using the measurements from the Wind spacecraft, we find 42 272 intervals with different levels of intermittency and with a duration of 5–6 min from 46 slow-wind streams between 2005 and 2013. Among them, each of the intermittent intervals is composed of one dominant intermittent structure and background turbulent fluctuations. For each interval, a magnetic spectral index αB is determined for the Fourier spectrum of the magnetic field fluctuations in the inertial range between 0.01 and 0.3 Hz. A parameter Imax, which corresponds to the maximum of the trace of the partial variance increments of the intermittent structure, is introduced as an indicator of the intermittency level. Our statistical result shows that, as Imax increases from 0 to 20, the magnetic spectrum becomes gradually steeper and the magnetic spectral index αB decreases from −1.63 to −2.01. Accordingly, for the first time, an empirical relation is established between αB and Imax: αB=0.4exp(-Imax/5)-2.02. The result will help us to uncover more details about the contributions of the intermittent structures to the magnetic power spectra and, furthermore, about the physical nature of the energy cascade taking place in the solar wind. It will also help to improve turbulence theories that contain intermittent structures.