The cost of credit has been climbing in recent weeks--and it could continue to rise if the Federal Reserve chooses to take additional action aimed at tightening credit to help sustain the nation's economic recovery over a longer period.

One example of the increase is the rate on conventional fixed-rate home mortgages bought by the Federal National Mortgage Association. At the regular weekly auction on July 6, the mortgage rate stood at 13.65 percent, up from 12.3 percent on May 11. Short-term rates also have risen more than a full percentage point since mid-May.

For consumers, these trends underscore the need to think and shop carefully when borrowing to keep interest costs to a minimum.

What you pay will depend on two key factors--the rate of interest and the length of the loan. The higher the rate and the longer the loan term, the greater the cost of the borrowed money.

Consider what happens to a $1,500 personal loan at various rates of interest and for various lengths of time.

Borrow the $1,500 for six months at a 14 percent annual percentage rate and you pay $62 interest. But you would pay $80 for the same loan if the institution charges 18 percent interest and $107 if it charges 24 percent interest.

The length of the loan period can be even more critical.

Interest costs nearly double when you borrow the $1,500 for 12 months rather than six months, jumping from $62 at 14 percent for six months to $116 at 14 percent for 12 months. Borrow for 18 months and you pay $172--triple the $62 interest cost for six months.

Stephen Brobeck, executive director of the Consumer Federation of America, a national nonprofit group based in the District, contends that consumers can save substantially on credit costs if they take time to shop and consider all the credit sources available to them.

One source he recommends is the "secured loan" that you may be able to obtain at your bank.

"If you have a certificate of deposit or a savings account, explore the options of borrowing on that," Brobeck said. "It is one of the cheapest ways to get credit."

Banks generally charge loan rates that are one to 2 percentage points over the rate paid on your certificate of deposit (CD) or savings account when you take out a secured loan. For instance, if you now earn 9 percent on your CD, the bank charge for your secured loan would be in the range of 10 to 11 percent, a recent survey indicated. The survey found that credit for unsecured loans at the same bank was 15 to 17 percent.

One drawback of a secured bank loan is that your savings account would be tied up while the loan is outstanding. In short, you could not withdraw savings that had been pledged as security for your loan as long as you owe for the loan.

Another source of low-priced credit, Brobeck said, is your insurance company if you have a whole life policy (coverage that is on your whole life rather than a specified term). Loan rates for this type of loan are spelled out in the policy and may vary from a low of 5 percent to a high of 12 percent. The amount you borrow will depend on how much you have paid into the policy.

Interest rates vary widely from one institution to another and even from one individual to another, depending on the person's credit rating, assets and standing with the lending institution. But here is a summary of some current rates for personal loans based on a recent check of Washington-area institutions:

* Bank and insurance company secured loans: 8 to 12 percent.

* Bank and credit union unsecured loans: 14 to 18 percent.

* Credit-card cash advances and purchases: 18 to 24 percent.

* Finance companies: 30 to 40 percent.

Consumer advocate Brobeck, after analyzing the cost of credit for consumers, has concluded that borrowers should "avoid finance companies and credit-card cash advances because their rates are so much higher" than other sources of loans.

Brobeck said that anyone who cannot get a loan from a conventional source--banks, credit unions, insurance companies--probably should not try to borrow money.

"It would cost them too much," he said. CAPTION: Chart, THE COST OF BORROWING $1,500