2 big things young people would sacrifice to buy a home—and 1 they can't live without

When it comes to buying a home, members of Generation Z — the oldest of whom are only just 23 years old — are willing to forgo an easy commute to work and proximity to nature if it means cutting overall costs. What they don't want to give up, however, is space.

That's according to real-estate website PropertyShark, which surveyed more than 2,100 U.S. renters, owners and people living with family, "about savings, home-ownership, amenity and community preferences," to better understand Gen Z, millennial, and Gen X attitudes toward home-buying.

Space is "the least likely aspect for Gen Z respondents to give up," according to the survey. Otherwise, though, "Gen Z is willing to compromise on almost anything to keep costs down," including a short commute, a garden, access to parks or a pool, and storage.

While professionally established millennials and those in Gen X "consider home offices fairly desirable," says PropertyShark, Gen Z would sacrifice a home office in favor of a home gym. And while members of Gen Z, like millennials, prize location, Gen Z is still more concerned about not being cramped.

Gen Z respondents are also "more willing to take on fixer-uppers" to keep costs down, according to the survey. Nearly half of Gen Z buyers put less than $10,000 down, versus 31 percent of millennials and 28 percent of Gen X.

It's "also noteworthy that 93 percent of Gen Z saved for less than five years for their down payments," says PropertyShark. "The cheaper homes Gen Z gravitates to is one explanation for the speed with which buyers managed to save, while help from parents is another."

Finances generally still present a problem: For those in Gen Z, the key obstacles to buying a home are student loans and the down payment, the survey finds. For millennials, 35 percent say the down payment is the issue, while almost 20 percent cite student debt.

Because of loans and high down payments, the survey says, many young people "who aspire to own their own place have been locked into the rental market far longer than previous generations. Millennials may be the largest category of home-buyers, but half of Americans born between 1980 and 1995 still rent," and that's "just as many as their younger Gen Z peers."

Still, Americans remain optimistic overall about their chances of buying a home. "More than 80 percent of respondents from all three generations expect to buy a home in the next five years," says PropertyShark, including 87 percent of millennials and 83 percent of those in Gen Z.

To gauge respondents' attitudes on housing, the researchers asked individual questions about savings, homeownership, amenity and community preferences, as well as demographic data, including employment and marital status.

Millennials were defined as those born between 1981 and 1994, Gen Z was defined as being born between 1995 and 1999, and Gen X was defined as those born before 1980.

If you're looking to buy a home, be sure you're ready to transition from renting. And if you're looking to rent, check out these budgeting hacks, credit card tips and other ways to save.

Like this story? Subscribe to CNBC Make It on YouTube!

Don't miss: Young people say these are the 2 main reasons they can't buy homes

Video by Mary Stevens and Andrea Kramar