Here’s an overview of how some of them work.

• Apple offers a trade-in program called Apple GiveBack. On Apple’s webpage, you can select the device you want to trade in, including iPhones or other smartphones from brands like Samsung, HTC and BlackBerry. You then answer a few questions about the model and condition of the phone to receive an estimate for what you can receive in Apple store credit. From there, you can take your phone to an Apple retail store or ask the company to send you a shipping kit to mail it in.

• The carriers have similar programs. AT&T, Verizon, T-Mobile and Sprint each accept a wide array of phones from various brands, which can be sold for credit that can be applied toward purchasing a new phone through the carrier.

• Gazelle has an extensive buyback program. The online reseller will let you sell smartphones, tablets and Macs. Similar to Apple, Gazelle will send you a shipping kit to mail in your device, or you can just send it with your own packaging. The benefit of using Gazelle — which is one reason I prefer it — is that it will offer cash, whereas the others only offer store credit that is tied to specific merchants.

• Best Buy offers gift credit in exchange for many used devices. Those include smartphones, tablets and video game hardware. This may be your most flexible trade-in option: Best Buy buys more types of devices from a broader array of brands than other buyback programs I have tested. In addition, the retailer sells phones that work with each of the big carriers.

After trading in your phone, you can use the credit in a couple of ways.

Let’s say, for example, you are trading in an iPhone 7 to Verizon Wireless. The Verizon webpage offers $185 in credit for that phone, and you accept it.

Now let’s imagine that the next new iPhone costs $1,049. If you buy the device outright from Verizon, you could shave $185 off the $1,049, bringing the total to $864.