In this paper, we investigate the Hyers–Ulam stability of the coefficient multipliers on the Hardy space \(H^2\) and the Bergman space \(A^2\) , meanwhile, we also investigate the Hyers–Ulam stability of the coefficient multipliers between the Bergman space \(A^2\) and the Hardy space \(H^2\) . We give the necessary and sufficient condition for the coefficient multipliers to have the Hyers–Ulam stability on the Hardy space \(H^2\) , on the Bergman space \(A^2\) and between the Bergman space \(A^2\) and the Hardy space \(H^2\) , respectively. We also show that the best constant of Hyers–Ulam stability exists under different circumstances. Some results generalized the results of MacGregor and Zhu when \(p=2\) in MacGregor and Zhu article (Mathematika 42:413–426, 1995). Moreover, some illustrative examples are also discussed.