Retired Navy Cmdr. Alfred A. Chalmers, 62, a Public Health Service officer who retired in 1972 after 33 years with the government, died of cancer Friday at the National Naval Medical Center in Bethesda.

A specialist in personnel management, Cmdr. Chalmers began his career with the Bureau of the Census in 1939. He worked for the departments of the Army and Navy before joining the PHS, where he became a management analysis officer in the Surgeon General's Office of Management and Policy.

During World War II, he served as a Navy personnel officer. Following the war he remained in the Naval reserves. He was commanding officer of Naval Reserve Composite Company No. 5-36 when he retired from military service in 1967.

Cmdr. Chalmers was born in Kansas City and earned a bachelor's degree from the University of Kansas in 1937. He later earned a master's degree in public administration from American University.

He did graduate work in Mexican culture, anthropology and Spanish at the University of the Americas in Cholula, Mex., and studied inEngland, Italy and Germany at summer institutes sponsored by the University of Kansas.

Cmdr. Chalmers was a charter member of the Oxon Hill Masonic Lodge No. 231. He also was a member of the Scottish Rite Shrine in Washington and the Quatuor Coronati Lodge No. 2076 of London, England.

Survivors include his wife, the former Waneta Gordon, of the home in Oxon Hill; a son, David, of Leonardtown, Md.; two daughters, Ann Milster, of St. Charles, Mo., and Cynthia Marshall, of Tallahassee, Fla.; a sister, Mildred Morales, of Raytown, Kan.