There is an old thread on this topic, but the old thread likely got buried and is not easy to find anymore, and I think it's always an interesting topic.
I calculate my savings rate as:
Numerator: Change in net worth for the period
Denominator: After-tax income + before tax savings automatically deducted from pay (i.e. RRSP contributions and employer match [I'm in Canada, RRSP is approximately equivalent to a 401K])
There's obviously a bit of an issue here because the change in net worth includes some market changes and income (i.e. dividends) that aren't included in the income number. However, these are small enough at this point in my journey that I'm not very concerned about it. At a later point it will likely make more sense to change the numerator to total contributions + principal reduction of any debt.
I see this a lot, and I'm always curious - why don't you include your before-tax savings (i.e. 401K, HSA) in your denominator? Assuming these are deducted directly from a paycheque, they wouldn't be included in your net (after tax) income, but they are technically a part of your income, just a part that gets saved before it hits your bank account.