Q:

Why does my iPhone power off when the battery is down to 30%?

Today I was walking using my iPhone 6S running iOS 9.3 as a pedometer and it shutdown. 
When I got home and plugged it in, it said 30% capacity. 
That seems strange. I would expect it for 2% or 5% to preserve RAM, but 30%? Maybe there is a setting I don't know about. 
My question is: Why does my iPhone power off when the battery is down to 30%? 
Edit: this is not a duplicate of the low battery crash as I witnessed the low power shutdown and it was not a crash. 

A:

This is usually for one of three reasons:

Aging battery. Lithium ion cells chemically age and peak power output decreases as does total charge available to supply at various voltage levels. 
Abnormal or failed / out of tolerance battery. Same as above, but the voltage and current is below spec for the battery age. 
Bad calibration or hardware. I've never seen that be 30% off, though. After the battery is drained completely, charge the phone back to 100% completely (and for good measure, leave it on the charger for another hour or two). An iPhone can draw more power than a perfect battery can provide due to defect or damage. It might not be the battery. 

