It’s no White House, but it’ll do.

The former president and first lady have purchased the mansion they were renting in Washington D.C. for $8.1 million. It boasts 8,200-square-feet, eight bedrooms and nine-and-a-half bathrooms. The home sits in the posh Kalorama neighborhood, where Ivanka Trump and Jared Kushner, as well as Secretary of State Rex Tillerson and Amazon CEO Jeff Bezos, also live.

MANDEL NGAN/AFP/Getty Images

“Given that President and Mrs. Obama will be in Washington for at least another two and a half years, it made sense for them to buy a home rather than continuing to rent the property,” Obama’s spokesman, Kevin Lewis, told CNN. The property’s previous owner was Joe Lockhart, the former press secretary for President Bill Clinton.

Even for the those of us who can’t afford an $8.1 million property, the Obamas purchase of their rental home offers some lessons for us all.

It still makes sense to buy
The choice to buy may be a smart one in general, research shows (though the Obamas may have paid too much for this particular home, which Zillow estimates that the home is only worth about $6.2 million). Indeed, an analysis by Trulia found that in all of the 100 largest cities it is still cheaper, in general, to buy than rent even when you factor in things like closing costs; in the D.C. area it is 28% cheaper to buy than to rent. To figure this out for your particular situation, use this calculator.

But you have to stay awhile
That said, you need to stay a while in the home you buy to make these calculations worth it. (The Obamas plan to stay at least until Sasha finishes high school, they’ve said.). And buying tends to look like a savvier move the longer you live in your home because those upfront fees get spread out over a longer time period. So how long do you need to stay? That depends on a lot of factors, but on average, Zillow estimates that you’ll break-even on your home in a little under two years. In D.C. the magic number is 3.6 years.

You should try before you buy
While most of us can’t rent the exact house we want to buy before we buy it, as the Obamas did, we can rent in the neighborhood we’re considering buying in. And that’s something experts say we should be doing. Zillow notes that this is important because it takes time to learn a neighborhood, and on GetRichSlowly, they write that “there really is no way to know what neighborhood will work best for you until you’ve spent a good amount of time actually living in the area.” Indeed, you may find by living in a neighborhood for a while that it’s not as convenient or quiet or safe as it initially seemed.