Abstract The thermal stability of a system of two superimposed miscible viscous fluid layers, under gravitational modulation, is investigated using linear stability analysis. It is well known in the literature that in the absence of gravitational modulation, there exist two convection regimes depending on the buoyancy number: the single-cell regime, where convection is oscillating and occupies the entire volume of the two fluid layers, and the stratified regime where stationary convection occurs in each fluid layer. Using Chebyshev's spectral collocation method and Floquet's theory, the numerical results show that under gravitational modulation, single-cell convection oscillates at half the frequency of the external oscillation (subharmonic threshold), while the stratified regime oscillates at a frequency equal to that of the forcing (harmonic threshold). The critical buoyancy number corresponding to the transition between the two convection regimes depends, in addition to the viscosity ratio and the depth of the two layers, on certain dimensionless frequencies permeating this transition and also on the amplitude of oscillation via the Froude number. In the plane of the critical Rayleigh number versus dimensionless modulation frequency, the branch associated with stratified convection does not depend on the buoyancy number for equal viscosities whereas this is the case for the whole-convection regime. For different viscosities, both convection regimes depend on the buoyancy number. At last, in the stratified regime (harmonic threshold), the critical value of the viscosity contrast, corresponding to the passage from an active layer to a passive layer and vice versa, increases with the modulation frequency.