Growing protoplanets experience a number of impacts during the accretion stage . A large impactor hits the surface of a protoplanet and produces a magma ocean , where the impactor ’ s iron emulsifies and experiences metal-silicate equilibration with the mantle of the protoplanet while it descends towards the base of the magma ocean . This process repeatedly occurs and determines the chemical compositions of both mantle and core . The partitioning is controlled by parameters such as the equilibration pressure and temperature , which are often associated with or assumed to be proportional to the pressure and temperature at the base of the magma ocean . The pressure and temperature depend on both the depth and shape of a magma ocean because a spatially confined magma ocean , namely , a melt pool , can have a larger equilibrium pressure than a radially uniform ( global ) magma ocean even if their melt volumes are the same . Here , we develop scaling laws for ( 1 ) the total internal energy gain due to an impact , and ( 2 ) the heat distribution within the mantle based on more than 100 smoothed particle hydrodynamic ( SPH ) simulations . We use Legendre polynomials to describe these scaling laws and determine their coefficients by linear regression , minimizing the error between our model and SPH simulations . The input parameters are the impact angle \theta ( 0 ^ { \circ } , 30 ^ { \circ } , 60 ^ { \circ } , and 90 ^ { \circ } ) , total mass M _ { T } ( 1 M _ { Mars } -53 M _ { Mars } , where M _ { Mars } is the mass of Mars ) , impact velocity v _ { imp } ( v _ { esc } -2 v _ { esc } , where v _ { esc } is the mutual escape velocity ) , and impactor-to-total mass ratio \gamma ( 0.03 - 0.5 ) . We find that the internal energy gain by a large impact is well characterized by the summation of the kinetic energy and accretional potential energy release as a function of the impact angle . We determine that the equilibrium pressure at the base of a melt pool can be higher ( by 10 - 50 \% ) than those obtained from conventional radially-uniform global magma ocean models . This could have a significant impact on element partitioning . These melt scaling laws are publicly available on GitHub ( https : //github.com/mikinakajima/MeltScalingLaw ) .