There are lots of different opinions out there, and I'm sure you'll get lots on this forum. You might also want to search the bogleheads forum to see how others have handled it.
Here's what we did:
1. added up mortgages (also add in other debt if you have it)
2. estimated the income needed from surviving spouse
3. subtracted net rental income from #2
4. divide annual income needed (#3 - #2) by .04 (assumes 4% SWR, which is also subject to debate)
5. added some money for college costs - wife was pregnant at the time
6. added some fluff on top
We added fluff because term policies are very cheap since we're in peak health, and we purchased 30yr term. We layered with two policies each. If we don't need/want the extra fluff in the future, we'll just stop paying on the second policy. But for now, we have a young baby and large mortgage, so we want the extra peace of mind.