if you are with t-mobile alrdy they will take the cost off you phone and the warants out but only if you go to a store not on the interenet so if you phone is 200 and the waranty for trading is 50 it will be about a 150$ phone with first month service
If your already in a contract with t-mobile its 400 dollars because it's without contract, if you can upgrade with a 2 year contract then it's 300 dollars
It depends on where you trade in your phone, ask t-mobile or try some websites to where you can get try that.