The Nimh battery Honda hybrids calculate useable capacity by counting current in/out and using voltage events/thresholds to set/reset flags.
If we use the Nimh CR-Z as our example it has seven voltage taps each monitoring twelve cells. (84 cells total)
The resting voltage of Nimh is not a good indication of the accurate SOC, so it not used like with the Lithium cars except for gross changes.
So let's imagine in a simplified example and (ignoring temperature and other effects for now) we have this pack charging descending a long hill.
The car will charge until a threshold is reached, either the pack voltage is x volts (full) or a voltage tap indicates an individual pair of sticks is full.
At that point it draws a line in the sand and says this is the start point A (Pack Full) It cuts regen and sets SOC to about 80%
Then we go straight onto a hill and climb for miles using assist all the way.
It allows normal discharge until it reaches a voltage threshold, again either a low pack voltage or an empty cell is detected.
This is the end point B. (Pack empty) It cuts assist and starts charging.
It has been counting current amps/Ah out during this time so it knows that it discharged say 4ah.
It knows the useable capacity in this window between point A full & B empty is 4Ah.
A new cell holds 6.5ah, so 4ah of that is 61%. That's our useable capacity.
Out of balance packs might have very narrow operating windows and low useable capacity.
That's why the balancing and rejuvenation is very useful. The pack is only as good as its weakest cell.
If one cell is say at 50% SOC and the other 83 are all at 75% SOC that's an immediate -25% hit on your useable capacity.
The system will recalibrate when the low cell hits empty to prevent damage even though the others all have 25% SOC left!
Nimh SOC drifts a lot over time, so each time an empty cell event occurs it resets the flags and starts charging until the full threshold is reached. (Recalibration)
This is basically it in a nutshell but a lot of stuff is going on behind the scenes including temperature and Peukert effect compensation.
Lithium is a bit different but the cells are monitored individually for voltage and the current is again counted.
Lithium can give an indication of its capacity purely from it's static voltage, so that is used in the mix.
Again if individual cells get empty/full or the pack reaches certain thresholds the useable capacity is recalculated/reset.
As there is a relationship between voltage and SOC for Lithium it also looks at what has been discharged and the expected versus the actual voltage drop.
As the cells age they will drop further in voltage for the same amount of capacity used.
The Toyota App probably watches and counts current and the voltage drops/rises to work out the expected versus actual changes.
From that it can calculate a % deterioration from the known behaviour of a new cell.