San Francisco doesn't come cheap — in general, the total cost of living is 62.6% higher than the US average.

Research engine FindTheHome crunched some numbers to determine what it takes for a family to live a secure, yet modest, lifestyle in the San Francisco metro area.

Using the Economic Policy Institute's family budget calculator — which accounts for two parents and two kids — FindTheHome created a cost of living index to compare over 600 US metros.

It then analyzed the data in San Francisco to determine a suggested household take-home income to live comfortably using the "50-30-20 rule" of personal finance, meaning 50% of after-tax, take-home pay goes to necessities (such as housing, food, childcare, healthcare, and transportation), 30% toward discretionary spending, and 20% toward saving.

Here's what the analysts came up with for a family of four:

Estimated cost of annual necessities: $76,776

Suggested annual discretionary spending: $46,066

Suggested annual savings: $30,710

Suggested annual take-home income: $153,552

Note that the estimated cost of annual necessities represents data for the San Francisco metro area, which encompasses more than just the city of San Francisco. You will need to budget more for rent if you're living in the heart of the city, where the average rent for a two bedroom apartment is just under $4,000 per month.

Scroll over the graphic for monthly cost estimates.

Note also that these numbers are suggestions based on the available data. They are meant for a four-person family and suggest a generous amount of annual savings, which may not be preferred or possible for some families.