The aim of this work was to develop and optimize the RP-HPLC method for the qualitative and quantitative analysis of riociguat and its four impurities using the Analytical Quality by Design concept. Risk assessment was carried out as a combination of Ishikawa diagram - Control, Noise and eXperimental - Failure mode and effect analysis from where critical method parameters for this study were selected (i.e. acetonitrile content in the mobile phase, concentration of ammonium acetate in aqueous part of mobile phase and column temperature). Their effects on critical method attributes (retention factor of the last eluting peak and separation of critical peak pairs) were further analyzed using the Design of Experiments methodology. The Design Space was defined as the area in which the robustness of the qualitative performance of the developed method is confirmed. Monte Carlo simulations were applied to achieve the defined quality by propagating the error resulting from the calculated coefficients of the mathematical models. The optimal chromatographic conditions included separation on an Xterra® RP18 (150 × 4.6 mm, 3.5 µm) column with a mobile phase consisting of 34 % of acetonitrile and 66 % of aqueous 15 mM ammonium acetate solution pH 5.5, at a column temperature of 36°C. The flow rate was 1 mL/min, the detection wavelength was 210 nm, while the injection volume was 20 µL. Validation of the developed method was performed, which confirmed its reliability in determining the content of riociguat and its four impurities in tablets.