William T. McDermott, 68, who retired from the Department of Agriculture as an accountant-analyst in 1973 and then became a private certified public accountant in Arlington, died at Arlington Hospital on Friday following a heart attack.

Mr. McDermott was born in Concord, Mass. He earned a bachelor's degree from the University of New Hampshire in 1935 and a master's degree from Boston University a year later.

He began his government career in 1939 as a parole officer with the U.S. Bureau of Prisons in Atlanta, and Talahassee, Fla. In 1943, he enlisted in the Army Air Corps and became a pilot. He returned to the Justice Department as a probation officer after leaving the serving in 1946 and worked in New York City.

He moved to Washington about 1949 and worked briefly at the National Training School for Boys here. In the same year, he joined the Internal Revenue Service as an agent. He was based in Alexandria and remained with the IRS until 1956, when he became a research analyst for the Commission on Government Security. He joined Agriculture in 1957 and remained there until his retirement in 1973.

Mr. McDermott took a law degree from George Washington University in 1953 and was admitted to the D.C. Bar. He earned a degree in accounting from Ben Franklin University in Washington in 1958.

After leaving Agriculture, he joined his wife, Delia, in an accounting practice in Arlington. He remained active in it until his death.

In addition to his wife, of the home in Springfield, survivors include a son, William T. Jr., of Richmond; two daughters, Clare Ellen, of Arlington, and Susan Dale, of the home; a sister, Margaret Gordon, of Oaks Bluffs, Mass., and two grandchildren.