Add the stop distance, the maintenance margin rate and your buffer, all as fractions of the entry, and divide 1 by the sum. With a 5% stop, 0.5% maintenance and a 1% buffer that is 1 ÷ 0.065 = 15.38, so 15x is the highest whole number.
The long liquidation at 15x is 60,000 × (1 − 1/15 + 0.005) = 56,300. That uses the same simplified isolated estimate as the liquidation price calculator: long liquidation = entry × (1 − 1/leverage + maintenance rate), and short liquidation = entry × (1 + 1/leverage − maintenance rate). The side is not an input. A stop below the entry is a long. A stop above the entry is a short.