NEW YORK — JPMorgan Chase and Goldman Sachs need better plans for coping with a severe recession, the Federal Reserve said Thursday, giving the banks until September to revise them.

The announcement came as part of the Fed’s so-called “stress tests,” its annual checkup of 18 of the country’s big banks. The government runs the tests to see how the banks would fare in a severe recession.

As a result of the tests, it also tells each bank whether it’s allowed to raise its dividend, the quarterly payout it gives to stockholders, or buy back more of its own shares.

The Fed said that JPMorgan and Goldman were allowed to start any dividend increases or share buybacks they may have asked for. That privilege would be withdrawn only if they didn’t submit new capital plans that satisfy the Fed.

Unlimited Digital Access. $1 for 4 weeks.

Ally Financial and BB&T fared worse: The Fed forbade them from going through with any dividend increases and share buybacks they may have asked for.

But overall, the Fed approved requests outright from 14 of the 18 banks it was examining, including Citigroup, Wells Fargo, Morgan Stanley and Bank of America.

Dividends and share buybacks are important to ordinary investors, and banks. The banks know that their investors suffered big losses in the financial crisis, and are eager to mollify them.

Some stockholders, especially retirees, rely on dividends for a key portion of their income.

Buybacks are also aimed at helping stockholders. By reducing a company’s number of outstanding shares, earnings per share can increase.

The Fed didn’t specify what each bank had asked for: dividend increases, share buybacks or both. The banks are allowed to release that information, but don’t have to.

For instance, Citigroup and Bank of America both said they got permission to buy back shares, but didn’t ask to raise their dividends. Both pay a quarterly dividend of a penny, or four cents a year.

The stress tests assumed that the banks would raise dividends and share buybacks as requested.

Those measures might be good for shareholders but they can also deplete the financial cushions banks need in emergencies.

To “pass” the tests, the banks needed to post a capital ratio of at least 5 percent in those projected scenarios.