Increased competition by banks and savings and loan associations for Keogh and Individual Retirement Accounts has broadened the avenues for investing for retirement.

Washington area financial institutions now offer IRA and Keogh programs ranging from short-term passbook savings accounts bearing 5.25 per cent interest to investment trusts aimed at long-term appreciation.

But some of the city's biggest banks including Riggs National Bank, Union First National Bank and Madison National Bank are not offering their customers either type of account and others have only one or the other. "It's a very costly service," a Riggs spokesman said without further elaboration.

In contrast, American Security Bank, National Savings and Trust, Clarendon Bank and Trust, National Bank of Washington and others have Keogh "master plans" that invest retirement funds in stocks, bonds and other securities.

Most suburban Maryland and Virginia banks and virtually all local savings and loan associations put IRA, and in some cases Keogh, plans in long-term certificates of deposit paying the highest interest rates permitted by law, 7.75 per cent.

Until this year, savings and loans could pay a quarter of a point more interest than banks on these accounts, a competitive advantage that helped S&L's get roughly twice as much of the market as banks. With the interest differential eliminated, banks will probably get more of the business.

Competition for retirement accounts is expected to increase - creating more investment opportunities for IRA and Keogh users - as financial institutions seek to increase their penetration of the market.

Of the million American workers not covered by government or private pensions, only an estimated two million to four million have set up their own tax-sheltered retirement plans.

"IRAs will become one of the major sources of funds for banks," predicted Earl McGuire, who headed an American Bankers Association committee that showed banks how to get into the business.

Although the interest rates paid on IRA accounts make them a relatively high-cost source of funds, the availability of the money for long terms can make IRAa a good business for banks, said McGuire, who is vice president for marketing of the Bank of Asheville, N.C.

Tom Moore, president of Central National Bank of Maryland, said his institution reinvests 7.75 per cent IRA funds in second mortgages at 10.5 per cent, and in auto loans which also produce an attractive interest spread.

The quarter-point interest advantage that savings and loans previously held was more of an advantage than it might have appeared, Moore said.As a tax-free investment, the difference for a customer in the 50 per cent tax bracket amounted to half a point, or 15.5 per cent versus 15 per cent. Over a six-year term, it was a lot of money.

Central National offers IRA investors certificates of deposit paying 7.75 per cent for six years and has a minimum term for IRA accounts of three years. That interest rate is offered on IRA certificates of deposit at some 20 other financial institutions surveyed, with terms ranging from threee to seven years.

Last year Central National of Maryland offered a 5.5 per cent passbook IRA plan, but it was dropped, Moore said, because "administratively we just didn't like it" and the vast majority of investors made lump sum payments.

Passbook IRAs are still offered by many local banks and S&Ls. Virginia National Bank has a 5 per cent passbook plan with no minimum investment. Passbook plans at 5.25 per cent are available from National Permanent Savings and Loan, Perpetual Savings and Loan, Metropolitan Federal Savings and Loan, Citizen Savings and Loan and Interstate Federal Savings and Loan, to name a few.

Some, like National Permanent, require a minimum investment of $500, and minimum contributions of $100. Most passbook IRA accounts can be converted to higher-interest, longer-term certificates of deposit when they reach minimum amounts, usually $500 or $1,000.

A variation on the usual Keogh certificate of deposit is offered by Columbia Federal Savings and Loan. Called Keogh Plus, it puts about 30 per cent of the Keogh contribution into a disability and life insurance policy. If the Keogh customer become disabled, the insurance provides for continued contributions to the plan at his regular rate. Because the certificate of deposit investment is smaller, the retirement fund is smaller.

Interest rates vary with the term of the certificate. The Post's survey of banks and savings associations indicated there is enough variation from one institution to another to make shopping around worthwhile.

Service charges for handling IRA accounts are rare. Some banks and associations will fill out the IRA paperwork on accounts, others provide reports that enable the depositor to do it in a few minutes.

Keogh plans are another matter, service charges for handling them are the rule rather than the exception. Annual fees start at $50 or 0.5 per cent of the account's assets and range up to 0.75 per cent, depending on the services provided.

Keogh paperwork is more complicated - figure 20 minutes just to fill out the forms to start one, one banker said - and two different year-end reports are needed. Some institutions will fill out the forms for customers, others provide a report so the depositor can do it.

Because the amounts of money involved are greater - a maximum of $7,500 per person per year against $1,500 for IRAs - Keogh plans can justify investments in trusts rather than simply certificates of deposit. Keogh funds can be managed like any other bank trust account or invested in master trust plans that pool the deposits of many small Keogh accounts.

Because Keogh trust plans require approval by the Securities and Exchange Commission and are restricted to financial institutions that have trustee powers, small banks and S&Ls rarely have them.

American Security Bank, which was the first District of Columbia bank to establish a Keogh master plan, is estimated to be the biggest locally with $5.75 million in assets.

American Security gives Keogh investors a choice of two accounts - a fixed income fund invested in bonds and an equity fund in stocks. Accounts can be in either or both funds, a spokesman said. First Virginia Bank has similar plans; Clarendon Bank and Trust has obtained approval for them, but so far only is offering certificates of deposit for Keogh accounts.

A First Virginia spokesman explained that a Keogh stock fund seeks to build assets by appreciation and is more frequently chosen by younger persons, while the bond fund builds on interest earnings and is the usual choice of older investors.

Banks which manage Keogh accounts like other trust funds allow their customers to choose the stocks in which the account invests. There is disagreement among bankers over how such accounts should be invested.

One Washington banker said he refused the request of a psychiatrist who wanted his entire Keogh account invested in highly speculative South African gold stocks. The banker said he feared he would not be living up to his legal responsibility as trustee if a retirement program were invested in such risky issues. The psychiatrist took his business elsewhere and a rival banker defended the decision to put the Keogh funds in gold. "I think it's silly to risk retirement like that, but it's his right to do so," the banker said.

Bank and savings and loan officers pointed out two changes in IRA rules this year that could affect decisions on investments.

Contributions no longer have to be made within the tax year which they cover, but can come up to 45 days later - mid-February for most people. This should allow people who didn't think about it extra time to get into a tax-sheltered retirement fund.

Although financial officials estimate that two-thirds or more of their IRA and Keogh business is done in the last two months of the year, the year end is not the best time to invest, Central National Bank of Maryland president Moore pointed out. By waiting until the end of the year, the investor loses a year's tax-free interest.

Another key change is a new IRA provision which allows accounts to be started for non-working spouses, assuring them of an independent retirement income. The husband or wife of a person who is eligible for an IRA can qualify for the new account if he or she has no earned income, is not covered by another pension plan and is under 70 1/2 years of age.

With a non-working spouse account, the total IRA contribution can be increased by $250 to a tax-sheltered investment of $1,750. But that money ought to be split into two separate accounts of $875 each to get the full tax advantage, said Susan Vicino, assistant branch manager at the Western Avenue office of Chevy Chase Savings and Loan.

Although the $875 balance in a first-year IRA would be below the $1,000 needed to qualify for the highest interest rates, the tax gains of separate accounts outweigh the interest advantage of a single, higher interest account, she said.