It is easier to buy on contract, but the math 1st.
pick a plan that includes the model iphone your looking at, times the monthly payment by the contract terms, add on any initial payment fot the phone and include inssurance.
Pick a sim only plan that gives you the sameair time and data included, then work out the total cost over the contract period the above example would cost you.
Deduct to see how 'cheap' your phone really will be against buying off contract.