New York City often bucks national trends. That can be a good thing, like when we add jobs following a recession at far faster rate than the rest of the country. But sometimes it’s not so good.

Take the issue of homelessness. Nationally, the number of homeless people has declined over the past six years by 6 percent, years that included a wrenching national recession and a period of rising home foreclosure. Over those same years, the number of homeless families and individuals in New York City has hit record highs, rising by 17 percent even though the recession and foreclosure crises were less severe here.

The number of homeless people nationwide fell from about 672,000 in 2007 to 634,000 in 2012, according to the federal Department of Housing and Urban Development’s 2012 Annual Homeless Assessment Report, which is based on counts during a single night. Over three-quarters of the decline in U.S. homelessness was attributable to fewer homeless families; from 2007 through 2012, the number of adults and children in homeless families declined by nearly 29,000, from about 423,000 to 394,000.

In New York, the numbers swung in a decidedly different direction. In fiscal year 2007, there was an annual average of 34,200 homeless people in the city’s shelter system each night, according to figures from the Department of Homeless Services. By 2012 the number had grown to more than 40,100, an increase of 5,900. In fiscal year 2013, which ended in June, the number of homeless grew by nearly 7,000, an increase of 17 percent, and totaled almost 47,100. This included more than 37,500 children and adults in homeless families. The increasing numbers of homeless was driven in part by the elimination of funding for the city’s Advantage program, which helped people move from shelters to permanent housing by temporarily subsidizing their rent.

Given these opposing national and local trajectories, it’s not surprising that HUD reports that among large cities, New York had by far the largest increase in its homeless population in 2012. HUD’s 2012 assessment report shows an annual increase of about 5,550 homeless people in New York City, a rise of nearly 11 percent. Percentagewise, that’s in line with Phoenix, but more than double the increase in San Francisco. Conversely, Los Angeles, Houston, Las Vegas, Fresno, and Philadelphia saw declines in homelessness that outpaced the 1 percent decline nationwide.

Mayor Bloomberg might contend that the declines in these other cities may have been achieved in part at New York’s expense. As the Mayor famously commented in March, “…you can arrive in your private jet at Kennedy Airport, take a private limousine and go straight to the shelter system, and walk in the door and we’ve got to give you shelter.” The Mayor is right on two counts: about 10 percent of homeless families list their last address as outside the city, as do a higher percentage of single adults, and New York, unlike any other city, has legal obligations to shelter the homeless. But it’s highly unlikely that their path to the shelter system follows the route he describes.

Soon, though, more cities may be on New York’s path. Federal budget cuts—the so-called sequestration—will be taking a toll on housing subsidies and support for homeless services programs. In February, HUD Secretary Shaun Donovan warned at a Senate Appropriations Committee hearing that cutbacks due to sequestration could result in 100,000 formerly homeless people nationwide being thrust back into homelessness. Donovan also said that an additional 125,000 individuals and families could lose their housing subsidies and as a result be at risk of homelessness.

The loss of rental subsidies is a particular risk for New York and could lead to some households currently receiving assistance falling into homelessness and also impede the city’s ability to provide subsidies that help the homeless leave the shelter system. As IBO noted in its report on the Mayor’s Executive Budget in May, the city’s Department of Housing Preservation and Development is expected to lose $36 million in federal Section 8 rent subsidies this fiscal year. City officials planned to tap a reserve fund to cover part of this year’s loss, but the budget hole remains completely unfilled for the ensuing years. A combination of cutbacks by Washington in federal fiscal year 2013 means the city’s public housing authority could lose $78 million in its share of Section 8 subsidies.

In 2004, the Bloomberg Administration set an ambitious goal of reducing New York’s homeless population by two-thirds by 2009. Instead, the city’s homeless population has grown. Now federal cutbacks threaten to further increase the number of children and adults without homes in New York—and nationwide.

Last month, the U.S. Conference of Mayors released a report that offered a discouraging view of homelessness across the country. Among 25 cities participating in a survey by the organization, 15 said the number of homeless in their communities had been increasing and another three said the number had stayed the same as last year. The other seven reported declines.

Some of the biggest cities in the survey admitted turning away a significant share of their homeless population because emergency shelters simply don’t have enough beds. Philadelphia reported turning away a third of those seeking shelter, Charlotte 25 percent, and Boston 20 percent.

New York City didn’t participate in the survey, but it could have provided some stark numbers of its own. Not only is the number of homeless on the rise here, but individuals and families are experiencing ever-longer stays in shelter beds. While court orders dating to the 1980s provide the homeless with a legal right to shelter, some advocates would argue that the city effectively turns people away through its eligibility review process. Still, with a growing number of people entering the homeless system, the city has added new shelter sites in recent months.

Over the first five months of this fiscal year (July-November), an average of 11,184 families, including those with children and adult families without children, spent the night in the city’s shelter system. That’s up by more than 1,600 families, or 17 percent, compared with the same five-month period last year.

These families are remaining in the shelter system more than a month longer on average than last year. Families with children typically spent 355 days in the city’s shelters as of the first four months of fiscal year 2013—up 40 days compared with the first four months of last fiscal year. For families without children, the picture is much the same. Average stays in the shelter system increased by 51 days, to 443 days during the first four months of this fiscal year.

The number of single adults spending the night in a city shelter has also grown by 10 percent, and averaged 9,213 over the first five months of this fiscal year. They, too, are also spending more days on average in the shelter system: 275 days during the first four months of this year, 12 days more than for the same four months last year.

There’s been a steady rise in the number of homeless and longer stays in the shelter system since the city eliminated the Advantage rental assistance program last year . The program had helped the homeless, mostly homeless families, leave city shelters by providing temporary rent subsidies. The program ended after the state eliminated its share of funding for the program, which cost in total about $210 million in 2011. The city’s share of the program’s cost was about $114 million.

Not surprisingly, more people and longer stays are driving up shelter spending. In November, the Mayor added $42.9 million in city, state, and federal funds to the budget for family shelters, bringing the total budget for 2013 to $466.5 million.

But IBO’s Elizabeth Brown says the additional funding is not enough to meet likely costs. Based on recent trends, she estimates that providing families with emergency shelter will cost about $42 million more than the Bloomberg Administration has budgeted for this year. Costs for emergency shelter for homeless single adults have also climbed.

In June 2004, the Mayor announced a five-year plan to cut homelessness by two-thirds. That plan never came close to meeting its goal and in recent months the city has sheltered record numbers of homeless New Yorkers. On Christmas Eve, more than 47,300 children and adults bedded down in the city’s shelters—a population about equal in size to the number of people who live in the upstate city of Binghamton.