This tool could save you a bunch of money on an iPhone 7 purchase

Wait a second, iPhone 7 prices start at $649 for the 32GB iPhone 7 version and go all the way up to $969 for the 256GB iPhone 7 Plus. So how can you save $1,700 on an iPhone 7 purchase? That’s simple, this iPhone 7 price calculator actually factors in the cash you pay to your carrier for a period of two years, and can save you plenty of money.

Sure, you may have already invested in a shiny new iPhone 7. But you could always return it, as the phone launched just last Friday, and order a new one using the tool. And if you haven’t purchased the iPhone 7 because it’s too damn expensive, then WalletHub’s calculator can come in handy.

First spotted by Fortune, the tool factors in various information, including device cost, carrier preference, and individual/family plans,

Surprisingly, WalletHub found one of Sprint’s individual plans to be the best options for consumers. Buyers would pay $1,757 on an iPhone 7 purchased with installment plan with 3GB of monthly data for two years.

T-Mobile came on top of family plans. Customers buying the iPhone 7 from the carrier with an installment plan would pay $3,828 over two years, getting 12GB of monthly data and four lines. The catch here is that you have to buy the phone from the carrier. Order the iPhone 7 from Apple, and the cheapest family plan is Sprint’s, which will cost $4,050.

The calculator doesn’t work only with the iPhone. You can use it for any other smartphone purchase if you’re looking to save money over the course of the next two years.

Check out the following infographic to see WalletHub’s iPhone 7 simulations, and try out the calculator yourself at this link.