The BMS, with modern firmware (anything from maybe 2016 onward), is
very... VERY good at calculating usable capacity. In short, if your car shuts down before 0 miles, then it very likely has a problem.
The BMS is using some very complex algorithms, including what appear to be full simulations based on historical readings, to calculate the capacity of
every single cell group (all 84 or 96). I've pitted this against bench testing equipment, and generally get to within < 1% the same data.
I'll preface this next part with the note that usable range below zero is
NOT guaranteed, nor has it ever been in any firmware version.
The modern BMS's target an "empty" of roughly -3%. In most cars this is ~10 miles or so. (This is actually the reason for some visible rated range drop in early Model 3's and such when they tweaked this on those vehicles.) This "buffer" (it's not really a buffer) is adjusted based on the BMS's perception of the error in its readings, and can grow as much as needed to make sure 0 on the dash is at least a mile of rated range. In the case of problem batteries, this can be a super high value, like 70% "buffer".
The key thing is that this buffer is not necessarily usable, and the error is greater the less the car is driven below about 20-30% or less SoC. Or put different, the more the car is short cycled above 20-30% (like daily driving from 90% to 70%). The BMS mitigates this with a variety of techniques and is generally always pretty cautious. It's basically a way to move the window of range it shows as available into an area of the capacity calculation's error bars that effectively guarantees capacity is available there.
In theory, if the BMS is reporting 0 miles of range, if perfectly calibrated you'd still have a few miles left "below" zero.
In reality, 0 should be treated as 0. Don't count on any capacity below it.
Above 0, however, if the BMS decides it has to stop the vehicle it means something is too far out of whack either as estimated idle or under load. This usually happens worse at very low SoC (<15%), and is exaggerated by the wear on the battery, and other factors like short cycling adding error to the capacity calculations.
Generally today, though, if your car stops you with a positive value on the range meter... something is probably wrong with the battery pack. This is what is guaranteed to happen in the case of screwy "repairs" like mixing modules from other packs or cutting out individual cells as touted as a fix on YouTube... things guaranteed to eventually leave you stranded.
Here's some of the output from one of 057's internal diagnostic tools showing data from the BMS tracking a ton of data about the battery pack at the individual group level. This one is a working pack with one group in one module a bit weaker than the rest. Since the BMS has been aware of this, and has adapted to this over years and many tens of thousands of miles, its able to anticipate the needs of that group and work accordingly. The CAC delta is getting pretty close to problematic here, though, and results in a periodic "Maximum Charge Level Reduced" error as a result. This pack should have around 68-70 kWh usable, but the CAC delta is causing the BMS to be more and more cautious as it fights to maintain order with the growing imbalance.
(This particular one turned out to be corrosion from moisture causing a mild short on that low CAC group.)
View attachment 835601
Here's another where some mismatched modules were introduced, eventually causing a failure as they were thrown more and more out of whack with the rest of the pack. The BMS had no clue how to handle this situation and couldn't make any reasonably predictions. So instead it had to lock out something like 25% of the pack, and eventually shutdown.
View attachment 835602
Voltage balance is only a small part of the equation. The BMS strives for capacity balance, and it works in interesting ways to achieve amazing results with homogenous original unmodified packs.
Long story short, the BMS is very very good at its job, and under normal conditions, you should never have a shutdown with > 0 miles.