The scary thing about owning a home is that you never know what expenses might creep up on you. I learned that the hard way back when I bought my house, and while I've since recovered, I'm here to share my big, fat mortgage mistake so that the rest of you don't fall into the same trap I did.

Now the ironic thing is that technically speaking, I didn't really make a mistake. I saved for my down payment, shopped around for a competitive mortgage rate, and made certain not to take on too high a mortgage -- or so I thought.

Two people signing documents, behind a model of a house on a table.

IMAGE SOURCE: GETTY IMAGES.

Where things went wrong

First, let me start by saying that I didn't purchase my house alone. My husband and I bought it together, which meant we had two incomes to work with. Once we made the decision to buy, we came up with a figure we'd be comfortable spending each month on our mortgage payment, property taxes, and homeowners' insurance. And, to our credit, that number did not exceed 30% of our estimated take-home pay.

Why is that significant? Most financial experts agree that spending more than 30% of your income on housing is a dangerous prospect, as doing so leaves you little wiggle room in your budget. Of course, not everyone follows this advice. In 2015, almost 12 million households spent more than half of their income on housing. But as someone who's more than familiar with that rule, I understood the importance of not surpassing the 30% threshold.

At the same time, we didn't exactly stay below it. At all. Rather, we took on a mortgage that, coupled with our property taxes and insurance, put us right at that 30% limit. And, unfortunately, things went south almost immediately after we closed on our loan.

Our property tax surprise

Like I said, my husband and I were smart enough to factor property taxes and homeowners' insurance into our calculations when coming up with our maximum housing payment. What we couldn't have anticipated, however, was an almost instant rise in our property taxes.

Having written about mortgages and homeownership for many years, I now know that property taxes have a sneaky way of going up, even during periods when home values drop. Case in point: In 2000, property taxes cost U.S. homeowners $247 billion, but by 2010, that figure had jumped to $476 billion despite the fact that the housing market had by no means recovered from its recent bust.

Back then, however, I didn't realize that all it took was a single real estate reassessment to cause my property taxes to climb more than $2,000 overnight. That's right -- after just a few months in our new home, we were suddenly on the hook for an extra $200 in taxes per month. And it hurt.

Other hidden costs

Meanwhile, because we'd upsized to a larger property, we were suddenly faced with higher costs all around. Our heating and electricity bills went up because we had more space to warm and cool. Our water bills went up because we had more grass to nourish. And although our home was fairly new, we found ourselves spending way more on maintenance than expected.

The average homeowner typically spends 1% to 4% of his or her property's value each year on maintenance and repairs. Having purchased a recently built house, we figured we'd stick to the low end of that range. But after a year of living in our home, we realized we were hitting the 2% to 3% mark.

All in, I'd say we wound up spending at least $6,000 more than anticipated during our first year of living in our new home. And that brings us back to my thoughtless mistake: I took on too high a mortgage payment given the many unknowns I would later come to face. Even though I stuck to that 30% limit (barely), I failed to account for the possibility of an instant rise in property taxes.

Furthermore, I didn't include my maintenance costs in that 30% calculation, and while some experts will tell you it's not necessary to do so, I strongly disagree. If you really want to play it safe, you'd be wise to keep your total housing costs to 30% of your income or below. This way, if you do have a month where a pipe bursts or your air conditioning unit goes kaput (both of which happened to me), you'll have more options for bearing those costs.

Our saving grace

While my husband and I made the mistake of maxing out our mortgage payments and failing to account for the peripheral costs of homeownership, one thing we did have going for us was a healthy emergency fund. Most experts will advise you to save three to six months' worth of living expenses, but if you're buying a home for the first time, you're better off aiming higher.

Prior to buying our house, my husband and I had a solid year's worth of living expenses in the bank. When our costs started coming in higher than expected, we were able to dip in as needed and, thankfully, never came close to taking on debt.

Here's another thing that worked out in our favor: Because my income as a writer is variable, my husband and I were conservative in our estimates of what I'd be making. Once we settled into our new home and my life was no longer a never-ending series of unpacking boxes and reorganizing, I was able to take on extra projects and ramp up my earnings to help cover our costs. This helped us not only stop drawing from our emergency savings, but replenish what we'd taken out.

Let this be a lesson

If there's one thing to take away from this story, it's that homeownership is a riskier prospect than most people realize. The truth is, when you're buying a home, the only cost you can really count on to remain stable over time is your mortgage payment, assuming you get a fixed loan. Property taxes can rise without warning (mine sure did). Homeowners' insurance rates can go up. And maintenance can be far more burdensome than you'd ever imagine, even if your home is brand spanking new. If you're looking to buy a home, make sure your mortgage payment is one you can really afford given the additional costs you'll no doubt encounter.

Finally, make sure you have emergency savings before getting that mortgage. The more cash you have on hand, the better protected you'll be when the hidden costs of homeownership come back to bite you.