If i buy iphone 5s from t-mobile contract free, is it going to be unlocked?

Or do i need to go to the apple store in order for that to happen? I then want to connect it with metro pcs. Is that possible?

If you want to buy unlocked just buy it from apple or from ebay daily deals. Ebay comes up with 16gb unlocked iphone 5s for like $580.

I don't know anything about using it on metro pcs though.

If you buy the phone from T-Mobile, the phone will be locked to T-Mobile even though it's contract-free. If you want to buy unlocked iPhone 5S, go to Apple Store. If you want to buy it cheaper, buy from outside T-Mobile or Apple Store. If you need iPhone 5S unlocked cheaper than the retail, mail me. Phone will work fine on MetroPCS with MetroPCS SIM.

Call t-mobile, since they now "own" Metro PCS outright, you might be able to just use the phone on metro-pcs. See what they might be willing to do for you.