For $x\in R$, the error function $\operatorname{erf}(x)$ is defined as In this paper, we answer the question: what are the greatest value p and the least value q, such that the double inequality $\operatorname {erf}(M_{p}(x,y;\lambda))\leq G(\operatorname{erf}(x),\operatorname {erf}(y);\lambda)\leq\operatorname{erf}(M_{q}(x,y;\lambda))$ holds for all $x,y\geq1$ (or $0< x,y<1$) and $\lambda\in(0,1)$? Here, $M_{r}(x,y;\lambda)=(\lambda x^{r} (1-\lambda)y^{r})^{1/r}$ ( $r\neq0$), $M_{0}(x,y;\lambda)=x^{\lambda}y^{1-\lambda}$ and $G(x,y;\lambda )=x^{\lambda}y^{1-\lambda}$ are the weighted power and the weighted geometric mean, respectively.