Black holes have been predicted to radiate particles and eventually evaporate, which has led to the information loss paradox and implies that the fundamental laws of quantum mechanics may be violated. Superstring theory, a consistent theory of quantum gravity, provides a possible solution to the paradox if evaporating black holes can actually be described in terms of standard quantum mechanical systems, as conjectured from the theory. Here, we test this conjecture by calculating the mass of a black hole in the corresponding quantum mechanical system numerically. Our results agree well with the prediction from gravity theory, including the leading quantum gravity correction. Our ability to simulate black holes offers the potential to further explore the yet mysterious nature of quantum gravity through well-established quantum mechanics.