I have a similar issue with my iPhone 6s (iOS 10.2), which I bought around end of November 2015. As soon as the battery reaches around ~30% the phone shuts down abruptly.
The problem is even more pronounced with charge ~20%, the phone would not restart at all- showing there is no charge.
Once I tried plugging it into charge with my laptop (on battery mode), even then it will not restart or charge. When it did restart, it again shut down immediately after reboot. The strangest problem I have seen.
I contacted Apple Support, they told me to restore the phone using iTunes so there is a fresh install of iOS 10.2 which will solve the issue. Newsflash for Apple, IT DOES NOT WORK!!!
Now I know Apple has introduced a limited battery replacement program for iPhone 6s bought in a certain time period, but it does not cover mine. I find this very strange, because the issue is much more widespread then these idiots think. This from a company which brags so much for seamless hardware and software integration in their products.
Then I took an appointment at Genius Bar, the guy said company just extended eligible "iPhone 6s bought period" for the battery replacement program, by a week. So now they seem to be covering phones bought till mid of November 2015. Such callous attitude by the company, and history of not accepting their mistakes.
This is a bug related to iOS 10.1 and it has worsened with 10.2. The first step towards correcting a mistake is its acceptance, and Apple hasn't even done that.
After 3 iPhones, its finally time for a switch to Android!!!