When I buy an iPhone 6 from the Apple website and select contract-free from T-Mobile, is the phone carrier unlocked? When Apple were selling iPhone 5s on the site, the T-Mobile option was a subset of "unlocked". 

Are the T-Mobile iPhone 6 unlocked?

If not how does get an unlocked iPhone 6 unlocked?
I found this answer for you

Best Answer:

after speaking with all the following - apple care, apple tech support, apple online sales, and tmobile sales - the "no contract" t-mobile phone IS officially unlocked and will work on any gsm carrier with the correct sized sim card. 

Background: 

A new law eff Aug. 2014 allows you to legally unlock your phone.
http://www.cnet.com/news/president-signs-cell-phone-unlocking-bill-into-law/

As result the carrier are adjusting to that by offering unlocked phones true they services in the hope you will stick with them, this time voluntarily and not be forced buy a 2 Years contract.

But: (there is always a But)

If you do the math, you will come to a result showing that a iPhone purchased without contract and on a cheep provider ($40/M), ends up about the same when purchased with 2 years contract at ($60/M). 

The reason! the unlocked phones are way more expensive, it is the money you pay upfront. 

So what is the gain? it is the freedom price you pay, the Freedom of choosing and switching providers at your leisure.