Abstract Recently, Hawking radiation of the black hole has been studied using the tunnel effect method. It is found that the radiation spectrum of the black hole is not a strictly pure thermal spectrum. How does the departure from pure thermal spectrum affect the entropy? This is a very interesting problem. In this Letter, we calculate the partition function by energy spectrum obtained from tunnel effect. Using the partition function, we compute the black hole entropy and derive the expression of the black hole entropy after considering the radiation. And we derive the entropy of charged black hole. In our calculation, we consider not only the correction to the black hole entropy due to fluctuation of energy but also the effect of the change of the black hole charges on entropy. There is no other hypothesis. Our result is more reasonable. According to the fact that the black hole entropy is not divergent, we obtain the lower limit of Banados–Teitelboim–Zanelli black hole energy. That is, the least energy of Banados–Teitelboim–Zanelli black hole, which satisfies the stationary condition in thermodynamics.