It’s easy to fall in love with a neighborhood in New York. And given the high cost of housing, it’s common to realize that you can’t afford the home you want in the neighborhood you love.

So, what to do? Your first instinct may be to look a few stops away on the same subway line, trading Williamsburg for Bushwick, for instance. Or you might choose a neighboring area, moving to Yorkville, say, instead of the Upper East Side.

Sometimes that works, but other times it only lands you in an inconvenient neighborhood with little resemblance to the area you had in mind. It can help to allow your imagination to range farther afield, maybe even across a river. Instead of proximity to your heart’s desire, consider places with similarities, like housing stock, nightlife and dining, the typical resident and the overall feel.

Following are five pairs of neighborhoods: a popular, expensive area, and a cheaper option, perhaps less well known. Of course there will be tradeoffs. But you might enjoy the alternative even more than the original.

UPPER WEST SIDE/PROSPECT HEIGHTS

THE charms of the Upper West Side are so well known they scarcely bear repeating. Ornate prewar co-op buildings and brownstone row houses line the neighborhood’s tree-canopied streets. Two of Manhattan’s great parks, Riverside and Central, delineate its boundaries. The schools are among the best in the city. It is home to the American Museum of Natural History, Lincoln Center and other world-class cultural institutions. But to live among all of that is quite expensive. The few brownstones that come on the market can top $10 million. Two-bedroom co-ops regularly sell for more than $1 million.

At 136 West 75th Street, a two-bedroom two-bath co-op is listed for sale for $1.195 million by Halstead Property. The median price per square foot in 2011 was $896, said Jonathan J. Miller of the appraisal firm Miller Samuel.

Park Slope, Brooklyn, has often been an option for those priced out of the Upper West Side, but with prices rising there, prospective buyers might consider its neighbor on the other side of Flatbush Avenue, Prospect Heights. There, the median per-square-foot price, $446, is half that of the Upper West Side, Mr. Miller said.

The neighborhood borders its own great green space, Prospect Park, as well as the broad Eastern Parkway and Grand Army Plaza. The Brooklyn Museum, the Brooklyn Public Library and the Brooklyn Botanic Garden are just across the parkway.

“The late-19th-century apartment buildings on Eastern Parkway and the row houses on the mid blocks — it’s the same style of architecture you find on the Upper West Side,” said Simeon Bankoff, the executive director of the Historic Districts Council, a citywide preservation group. Much of the southern end of the neighborhood is under landmark protection, including stretches of St. Mark’s Avenue, Prospect Place and Park Place. To the north are smaller brick row houses and the construction site of the arena for the vast Atlantic Yards development.

A wave of new residents arrived in the early 1990s, said Gib Veconi, the treasurer of the Prospect Heights Neighborhood Development Council.

“People would buy a house with their last dollar,” Mr. Veconi said, “start remodeling the ground floor and rent it out to get some income, and slowly renovate over time, mostly with their own labor.”

Now, he said, more affluent residents buy houses and commission half-million-dollar gut renovations in under a year.

David Rogers, a broker with Prudential Douglas Elliman, said brownstones in the neighborhood sold for roughly $1.4 million to $1.8 million, depending on condition and location.

At 416 Park Place, a two-family town house with a three-bedroom owner’s duplex is listed at $1.55 million by Brown Harris Stevens.

New bars, restaurants and coffee shops have recently opened on Vanderbilt Avenue, the neighborhood’s commercial spine. Saul Bolton, who earned a Michelin star for his restaurant in Boerum Hill, opened a restaurant here called the Vanderbilt. The ice cream shop Ample Hills Creamery draws crowds of children on summer afternoons.

The large houses of Prospect Heights have drawn families to the area. Joyce Szuflita, the founder of NYC School Help, which helps families find schools in Brooklyn, said parents had put a lot of energy into improving Public School 9.

Mr. Veconi of the development council said Prospect Heights’ new appeal was not surprising. “The allure here was that this was an undervalued neighborhood,” he said. “I felt like people were going to get this sooner or later.”

LOWER EAST SIDE/GREENPOINT

Over the last two decades the Lower East Side has become a microcosm of everything New York is known for. Its short, intimate blocks harbor innovative restaurants, boutiques, galleries and clubs. Its history as an immigrant enclave is celebrated at the Tenement Museum, and its Jewish past persists at the venerable Eldridge Street Synagogue and the lox purveyors Russ & Daughters on East Houston Street.

And as the neighborhood changed, the price of housing soared. New condos sell for a median of $1,020 per square foot, according to Mr. Miller, who said asking prices over $1 million were not uncommon. In the new building at 60 Orchard Street, Stribling & Associates is listing a two-bedroom two-bath condo for $1.35 million.

But prospective buyers would do well to look across the East River at Greenpoint, Brooklyn, which has a vibrant ethnic history as well as lively shopping and dining — and much lower housing prices. The median condo price per square foot in Greenpoint is $563, Mr. Miller said. At 149 Huron Street, two blocks from the subway, Apartments and Lofts has an accepted offer on a two-bedroom condo listed for $513,000.

Greenpoint is not as convenient as its better-known neighbor to the south, Williamsburg, because it is on the G subway line and Manhattan is not a straight shot. The housing is a mix of new condos, small apartment buildings, brownstones, brick town houses, conversions, a few loft spaces and wooden row houses, many covered in vinyl siding. For many decades Greenpoint was a Polish enclave, and Manhattan Avenue is crowded with bakeries, butcher shops displaying kielbasa, and inexpensive Polish restaurants.

But now, wedged in among Polish businesses, the avenue also has an artisanal ice cream parlor that serves Earl Gray cones, an infants’ clothing and toy store, and coffee shops. The area around Franklin Avenue, once a desolate strip, has restaurants, bars, shops and condos, and is part of a small historic district.

Families have been attracted to the neighborhood because they can get more space without sacrificing the quality of their schools. P. S. 31, for example, gets high scores: 90 percent of students meet state standards for reading and 97 percent for math.

“Greenpoint is a great Brooklyn neighborhood,” said David Maundrell, the founder of Apartments and Lofts, which markets many condos in the area. “There are different ethnic backgrounds, the Polish and Irish and the new people moving in over the last 10 years. You have amazing retail and services. It is a well-rounded neighborhood.”

CARROLL GARDENS/CROWN HEIGHTS NORTH

Inside Vinny’s of Carroll Gardens on Smith Street, firefighters sit alongside locals in their 70s out for a meal with their grandchildren. Waitresses sit down at your table to take your order. The food is old-school Italian — red sauce and eggplant-parm heroes. Next door to Vinny’s is Persons of Interest, a new old-school barbershop where the “combo platter” — a shave and a haircut — costs $75.

It is that congenial mix of the traditional and the retro-modern that has drawn well-heeled newcomers, many with families, to the deep-yarded brownstones that are Carroll Gardens’ signature. Asking prices for these houses, many built in around the time of the Civil War, can easily top $2 million; the median price was $602 per square foot last year, according to Mr. Miller.

At 230 Union Street, Prudential Douglas Elliman is listing a town house for $2.295 million.

About three miles east lies Crown Heights North, a neighborhood with a trove of brownstones and row houses, in a variety of styles, that can be had for a fraction of those in Carroll Gardens. The median price for all of Crown Heights last year was $384 per square foot, Mr. Miller said. The houses are of newer vintage, built from about 1870 to 1920, but many bear the elaborate details of the Gilded Age.

Once among Brooklyn’s wealthiest neighborhoods, Crown Heights is filled with mansions and town houses. Many were built by well-known architects, including Montrose Morris, Axel Hedman and C. P. H Gilbert.

“This was the luxury housing of its day,” said Simeon Bankoff, the director of the Historic Districts Council. “There are some drop-dead gorgeous buildings there.”

Today Crown Heights North has a large historic district. St. Marks Avenue, Dean Street and multiple blocks of Prospect Place have some very ornate houses. These sell for over $1 million when they become available, said Barbara Brown-Allen, a broker with Prudential Douglas Elliman.

Other houses, depending on the work required to bring them up to snuff, go for $700,000 to $900,000. Many are quite large, often 20 feet wide by 50 feet deep and four stories tall. At 1174 Dean Street, Prudential Douglas Elliman is listing a town house for $1.195 million.

The 2, 3, 4 and 5 trains run through the neighborhood, and the A and C are not far away, in Bedford-Stuyvesant. Franklin Avenue, the main commercial strip, is about a mile from Prospect Park.

A number of the stores cater to West Indian and Panamanian residents. Nick Juravich, who blogs about the neighborhood at I Love Franklin Avenue, said that since he moved here in 2008, more than 30 businesses had opened, including Mexican, Indian and Thai restaurants. “We have a sleek new wine bar that would fit right in on Smith Street,” he said, meaning the main drag in Carroll Gardens.

HELL’S KITCHEN/LONG ISLAND CITY

Hell’s Kitchen, as is obvious from its name, wasn’t always the most desirable place to live. But that has changed, at first slowly and then more quickly. Restaurants, bars, coffee shops and other businesses have settled in along Ninth Avenue, and a few are opening farther west on 10th Avenue.

Much of Hell’s Kitchen has been protected from high-rise development, so that on the cross streets, low-rise town houses, brownstones and historic churches remain. In the northern part of the neighborhood, Prudential Douglas Elliman is listing a two-bedroom two-bath condoat 426 West 58th Street for $1.749 million.

Development has been pushed to the neighborhood’s edges, toward the Hudson River and along 42nd Street, where high-rises, mostly rentals, have sprouted in the last few years. Two-bedrooms at the new MiMA tower on 42nd Street rent for about $6,500 a month; the most expensive three-bedroom there is $16,250 a month.

Mr. Miller said the median price per square foot in Hell’s Kitchen in 2011 was $854 — a bargain compared with costs in some other Manhattan neighborhoods.

But that figure is still 35 percent more expensive than the median of $555 in Long Island City, Queens, which is growing its own forest of handsomely appointed residential towers. Large condo projects are rising throughout the neighborhood, overshadowing brick town houses, as well as garages and other businesses.

It’s easy to see why developers are drawn to its East River shoreline. High-rise towers are under construction alongside a riverfront park with views to the west of the United Nations and Midtown — just a few minutes away on half a dozen subway lines. Restaurants, supermarkets, preschools and dog day care centers are popping up. The neighborhood has a mix of old and new on Vernon Avenue, the commercial strip closest to the water. There’s a strong arts community and even some remaining manufacturing.

Long Island City is home to MoMA PS1, a center for modern art and performance events. Galleries and lofts are taking over industrial buildings.

“You have a sense of a real community here,” said Bob Singleton, the director of the Greater Astoria Historical Society. “You have all the benefits of a small town with all of the advantages of a big city right next to you in Midtown Manhattan.”

Eric Benaim began selling units in Long Island City in 2006 through his firm Modern Spaces, which lists a two-bedroom two-bath condo at L Haus on 49th Avenue for $870,000.

“It has all started happening over here in the last year and a half or so,” Mr. Benaim said. And, he added, “It’s only about eight minutes on the subway to Hell’s Kitchen.”

SOHO/LADIES’ MILE

When artists began moving into lofts in manufacturing buildings with cast-iron fronts in SoHo in the 1960s and 1970s, they were looking for cheap space to live and work. But they wound up changing the way people think about cities, said Andrew Berman, the director of the Greenwich Village Society for Historic Preservation.

“We take for granted the notion that it is cool to live in a converted loft building in an old industrial section of a city,” Mr. Berman said. “But that is a relatively new concept, an outgrowth of artists’ taking over disused industrial spaces in SoHo.”

Today, few artists could afford to buy a loft in SoHo. The neighborhood is packed with boutiques, brand-name stores, upscale restaurants and hotels. Lofts that decades ago housed painters sell for millions of dollars, like one listed by Prudential Douglas Elliman for $3.25 million at 475 Broadway, now in contract. The median price per square foot is $1,122, according to Mr. Miller.

Just 20 blocks uptown, another neighborhood is going through a similar revival: the Ladies’ Mile Historic District. Roughly framed by the Avenue of the Americas and Broadway from 17th to 24th Street, the area also has historic loft buildings with large windows and cast-iron facades. But the median per-square-foot price is $987, about 20 percent less than in SoHo, Mr. Miller said.

And it has a different history. The Ladies’ Mile was home to some of the city’s largest department stores, including Macy’s and Lord & Taylor.

Unlike the industrial buildings of SoHo, the stores along the Ladies’ Mile were ornate, many built in the Beaux-Arts style. Some have mansard roofs. The former Hugh O’Neill store has large gold domes.

As in SoHo, artists found their way to the upper floors of these large buildings. So many photographers worked here that it was called the photo district, said Jack Taylor, the president of the Drive to Protect the Ladies’ Mile District. However, it differed from SoHo in that galleries, restaurants and retail were slow to follow.

The historic district was approved in 1989. About a decade ago, big-box stores moved in. Today the area has a TJ Maxx, a Best Buy, a Home Depot and a Trader Joe’s. There are new restaurants; on a recent Sunday, the line at the brunch spot tbsp on 20th Street was nearly out the door.

Some of the old department stores are being converted into condos, including the O’Neill Building and the Cammeyer, a former shoe emporium at 650 Sixth Avenue, where CORE is marketing a unit for $2.85 million. The units are not the same raw and massive spaces one finds in SoHo.

“It feels more like a residential neighborhood,” Mr. Taylor said. “Ladies’ Mile used to be like Siberia, but now it can be pretty hard to bear in terms of noise and crowds. There is no denying it is populated.”