Retired Navy Capt. Ralph Chandler Parker, 95, a veteran of two world wars and a naval historian, died of pneumonia Monday at Bethesda Naval Medical Center. He had cancer.

When World War II broke out, Capt. Parker was in command of the Alaskan sector of the 13th Naval District. He then commanded the Reserve Officers Training School at Princeton University.

In 1943, he became head of the analytical section of the staff of Adm. Chester W. Nimitz in the Pacific and was at Kwajalein and Iwo Jima.

Capt. Parker retired after the war but was called back to active duty a short while later to serve in the hisotrical section of the Navy Department. There he worked closely with the noted historian, Samuel E. Morison, in compiling "The Two-Ocean War," an official history of the Navy during World War II. Mr Morison acknowledged his debt to Capt. Parker in the preface.

Capt. Parker retired a second time in 1949.

He was born in Batavia, N.Y., and attended Union College in Schenectady. After graduating from the Naval Academy in Annapolis in 1907, he went on the historic trip around the world with the Great White Fleet that year.

He had two destroyer commands in European waters during World War I. After the war, he served twice as an instructor at the Naval Academy.

He also commanded destroyers and a destroyer division. In the early 1930s, he was with the war plans division in the Office of the Chief of Naval Operations. In 1937, he commanded a cruiser and was flag captain to Adm. Husband E. Kimmel when a division of cruisers went around South America.

Capt. Parker's decorations included the Navy Cross and Legion of Merit.

He had lived in Bethesda for many years.

He is survived by a son, retired Navy Rear Adm. Ralph Chandler Jr., of Pittsford, N.Y., and two grandchildren. His wife, the former Elizabeth Caney, died here in 1973.