Purpose The abnormality of the month-of-the-year and Ramadan effects has extensively existed in the stock and other markets. The commercial strategy pattern and the computation of such predictable patterns in the market allow investors to make money. By using anomalies such as the month-of-the-year and the Ramadan effects on earnings management (EM), it is possible to achieve such a goal. This study aims to investigate the month-of-the-year effect and the Ramadan effect on the relationship between accrual earnings management and real earnings management (AEM and REM, respectively) and liquidity in the Iranian capital market. Design/methodology/approach This empirical analysis comprises a panel data set of 80 listed firms (400 observations) on the Tehran Stock Exchange from 2016 to 2020. Findings The findings exhibit that when AEM and REM increase, information asymmetry also increases. The simultaneous increase of these variables leads to a decrease in stock liquidity. Furthermore, the results indicate that the month-of-the-year and Ramadan effects intensify the negative relationship between AEM and REM with stock liquidity. Therefore, EM is affected by the investor’s behavior in specific months. Practical implications Anomalies caused by the Ramadan effect and the month-of-the-year effect on reducing liquidity in the Iranian stock market were confirmed. Investors can use these anomalies to identify predictable patterns, exchange securities according to those patterns and earn abnormal returns. Originality/value To the best of the authors’ knowledge, this is the first study that empirically examined the simultaneous effect of Gregorian and Islamic calendar anomalies on the relationship between EM and liquidity, and while helping managers and other readers, it can be the basis for future research.