Winnings are calculated based on your initial bet and the multiplier you reach before choosing to withdraw the money or find a mine. Each safe piece you discover increases your multiplier, increasing your potential winnings.