Solana - Active Stake
Breakdown of all active stake in the system for the current epoch. There are two views "ValidatorStaked" and "AuthorizedStaker".
ValidatorStaked - breakdown is by validator pubkey. This is the active stake delegated to a particular validator. This is a simple RPC call provided by the node.
AuthorizedStaker - breakdown is by authorized staker pubkey. This is the total active stake delegated by a particular authorized staker. The calculation is much more complicated, for each stake it needs to 'move through epochs' using warm up and cool down of stake to determine what stake is active in the current epoch. You can see the calculation by looking at the code. The authorized staker is not exactly the same as the owner, it is the key that controls the delegation of the stake. Until the 7th Jan 2021 the majority of stake is in the form of 'locked stake accounts', the eventual recipients of the funds cannot withdraw but they can stake the funds to validators.
Theoretically the totals of both views should be equal. In practice they are only very close, because numbers from RPC calls are 64bit integers (Lamports) but JavaScript loses precision on integers over 2^53. You could use BigInt but I'm not that bothered. Quantities rounded and displayed in Sol.