It depends on which installment plan you have.
AT&T Installment Plan
You'll have to pay your full installment balance before you can upgrade. But your old device is yours to keep. Find out how to pay off your installment balance.
AT&T Installment Plan with Next Up
You can upgrade after you’ve paid 50% of the device retail price and trade it in, along with the $5 monthly Next Up charge.
AT&T Next® or AT&T Next Every Year®
You can upgrade early after paying off most of your installment plan. For AT&T Next Every Year, it’s 50%, and for AT&T Next, it’s 80%.
Find out how you can upgrade early (if your account is in good standing).