Creating a fair investment environment is crucial for economic growth and attracting domestic and foreign investors. The purpose of this study is to find out how the shadow economy, harshness of courts against corrupt officials, tax pressure, and restrictions on business affect the fair investment environment. Therefore, two economic-mathematical models are built using multiple least squares regression analysis, in which the outcome variables are: in model 1 ‒ control over corruption, which is a component of the Global Governance Index; in model 2 ‒ the European Business Association’s Investment Attractiveness Index. The composition of the factor attributes in both models is the same: Corruption Perceptions Index by Transparency International; level of shadow economy according to the Ministry of Economy of Ukraine; the number of criminal cases in courts under the article “Acceptance of an offer, promise or receipt of an undue benefit by an official” using open data from the Unified State Register of Court Decisions; total tax and fee rate, which reflects taxes and mandatory payments as a percentage of commercial profit, determined by the World Bank Group methodology; assessment of “Starting Business” by Doing Business, according to the methodology of the World Bank Group. The modeling is based on the example of Ukraine for 2012‒2022. Calculations based on Model 1 show that restrictions on business have the greatest impact on the corruption control indicator (a 10% reduction in restrictions leads to a 3-point reduction in the need to control corruption), the shadow economy and tax pressure have an average impact (a one-point increase in them will increase the level of corruption by 0.4 points). The harshness of the courts against corrupt officials has the least impact (most corruption cases in Ukraine do not reach the courts). Calculations based on Model 2 show that the complexity of starting a business exerts the greatest impact on investment attractiveness (if it decreases by 15%, investment attractiveness will increase by almost 1 unit). The average impact is exerted by the increase in the shadow economy (a 10% increase in the shadow economy leads to a rise in investment attractiveness by 0.4 units). The insignificant impact is exerted by the tax burden and judicial punishment of corrupt officials.