Context. A comparison of solar and stellar brightness variations is hampered by the difference in spectral passbands that are used in observations, and also by the possible difference in the inclination of the solar and stellar rotation axes from the line of sight. Aims. We calculate the rotational variability of the Sun as it would be measured in passbands used for stellar observations. In particular, we consider the filter systems used by the CoRoT, Kepler, TESS, and Gaia space missions. We also quantify the effect of the inclination of the rotation axis on the solar rotational variability. Methods. We employed the spectral and total irradiance reconstruction (SATIRE) model to calculate solar brightness variations in different filter systems as observed from the ecliptic plane. We then combined the simulations of the surface distribution of the magnetic features at different inclinations using a surface flux transport model with the SATIRE calculations to compute the dependence of the variability on the inclination. Results. For an ecliptic-bound observer, the amplitude of the solar rotational variability, as observed in the total solar irradiance (TSI), is 0.68 mmag (averaged over solar cycles 21–24). We obtained corresponding amplitudes in the Kepler (0.74 mmag), CoRoT (0.73 mmag), TESS (0.62 mmag), Gaia G (0.74 mmag), Gaia GRP (0.62 mmag), and Gaia GBP (0.86 mmag) passbands. Decreasing the inclination of the rotation axis decreases the rotational variability. For a sample of randomly inclined stars, the variability is on average 15% lower in all filter systems we considered. This almost compensates for the difference in amplitudes of the variability in TSI and Kepler passbands, making the amplitudes derived from the TSI records an ideal representation of the solar rotational variability for comparison to Kepler stars with unknown inclinations. Conclusions. The TSI appears to be a relatively good measure of solar variability for comparisons with stellar measurements in the CoRoT, Kepler, TESS Gaia G, and Gaia GRP filters. Whereas the correction factors can be used to convert the variability amplitude from solar measurements into the values expected for stellar missions, the inclination affects the shapes of the light curves so that a much more sophisticated correction than simple scaling is needed to obtain light curves out of the ecliptic for the Sun.