Potential energy depends on:
change in position of the object
mass of the object
Potential energy is the energy possessed by an object by virtue of its position.
Potential energy possessed by an object is given by,
PE = m×g×h, where m - mass of the object, g - acceleration due to gravity and h - height to which the object is raised from ground level.