WASHINGTON (AP) _ A computerized library network says that ''Megatrends,'' a best-selling analysis of changes in contemporary life, is on more library shelves across the United States than any other book.

In second place was ''In Search of Excellence,'' the book touting some of America's best-run companies, while a reference book, ''The Chicago Manual of Style,'' was third.

The Online Computer Library Center in Dublin, Ohio, compiled a list of the top 40 books from its own records of the books held by some 4,000 libraries.

The list is heavy with reference works and missing the book commonly cited as the best-seller of all times: the Bible.

That is because there are thousands of different editions and translations of the Bible, and the center's computerized list only deals with the single edition of a book that turns up most often in member libraries' records.

Shakespeare, one of the most prolific and probably the most popular playwright, is missing from this top 40 list for the same reason, Phil Schieber, the center's manager of public relations, said in a telephone interview.

Nonetheless, there are ''almost 12,000 entries'' of various editions of Shakespeare's plays, poems and sonnets, he said.

But the list includes not only reference works such as Bartlett's ''Familiar Quotations,'' but books by two recent presidents, Richard M. Nixon and Jimmy Carter; two books by former Secretary of State Henry Kissinger; George Gilder's ''Wealth and Poverty,'' a favorite of supply-side economists; ''The Fate of the Earth'' by Jonathan Schell, and ''The Brethren: Inside the Supreme Court'' by Bob Woodward and Scott Armstrong.

The top 40 list does not show how many copies of a particular book each library had.

The center, which has an annual budget of $56 million and a staff of 770, provides services for more than 6,000 libraries in the United States and nine other countries. About two-thirds of the libraries have their full holdings entered into the computerized network; the rest use the center to arrange interlibrary loans or for other services.

The center, originally started in 1967 by university presidents in Ohio to link their institutions' libraries, began its wider network in 1971 and now has almost 12 million titles in its database. It began compiling its top 40 list a year ago, when ''Megatrends'' was also at the top.

It now compiles the list quarterly. The most recent, done in January, showed these editions as the top 40:

1. ''Megatrends: Ten New Directions Transforming Our Lives,'' by John Naisbitt.

2. ''In Search of Excellence: Lessons from America's Best-Run Companies,'' by Thomas J. Peters and Robert H. Waterman, Jr.

3. ''The Chicago Manual of Style: For Authors, Editors, and Copywriters.''

4. ''Anglo-American Cataloguing Rules,'' edited by Michael Corman and Paul W. Winkler.

5. ''Familiar Quotations: A Collection of Passages, Phrases, and Proverbs Traced to Their Sources in Ancient and Modern Literature,'' by John Bartlett.

6. ''Guide to Reference Books,'' compiled by Eugene P. Sheehy.

7. ''Theory Z: How American Business Can Meet the Japanese Challenge,'' by William G. Ouchi.

8. ''A Manual for Writers of Term Papers, Theses, and Dissertations,'' by Kate L. Turabian.

9. ''The Fate of the Earth,'' by Jonathan Schell.

10. ''Energy Future: Report of the Energy Project at the Harvard Business School,'' edited by Robert Stobaugh and Daniel Yergin.

11. ''Harvard Encyclopedia of American Ethnic Groups,'' edited by Stephan Thernstrom and others.

12. ''Vietnam: A History,'' by Stanley Karnow.

13. ''The One Minute Manager,'' by Kenneth Blanchard and Spencer Johnson.

14. ''Encyclopedia of Bioethics,'' edited by Warren T. Reich.

15. ''The Third Wave,'' by Alvin Toffler.

16. ''Encyclopedia of Computer Science and Engineering,'' edited by Anthony Ralston.

17. ''The Real War,'' by Richard M. Nixon.

18. ''Washington Information Directory.''

19. ''The Mismeasure of Man,'' by Stephen Jay Gould.

20. ''The Discoverers,'' by Daniel J. Boorstin.

21. ''Managing in Turbulent Times,'' by Peter F. Drucker.

22. ''The Brethren: Inside the Supreme Court,'' by Bob Woodward and Scott Armstrong.

23. ''The Elements of Style,'' by William Strunk, Jr., with revisions, an introduction, and a chapter on writing by E. B. White.

24. ''Black's Law Dictionary,'' by Henry Campbell Black.

25. ''Wealth and Poverty,'' by George Gilder.

26. ''Congressional Quarterly's Guide to the U.S. Supreme Court.''

27. ''McGraw-Hill Encyclopedia of Science and Technology.''

27. ''Keeping Faith: Memoirs of a President,'' by Jimmy Carter.

29. ''Free to Choose: A Personal Statement,'' by Milton Friedman and Rose Friedman.

30. ''White House Years,'' by Henry Kissinger.

31. ''Encyclopedia of Economics,'' edited by Douglas Greenwald and Associates.

32. ''Years of Upheaval,'' by Henry Kissinger.

33. ''Let the Trumpet Sound: The Life of Martin Luther King Jr.,'' by Stephen B. Oates.

34. ''Cosmos,'' by Carl Sagan.

35. ''Congressional Quarterly's Federal Regulatory Directory.''

36. ''Hazardous Waste in America: Our Number One Environmental Crisis,'' by Samuel S. Epstein, Lester O. Brown, and Carl Pope.

37. ''The March of Folly: From Troy to Vietnam,'' by Barbara W. Tuchman.

38. ''The Oxford Companion to American Literature,'' by James D. Hart.

39. ''U.S. Foreign Policy,'' edited by Marlow Reddleman.

40. ''The Encyclopedia of American Religions,'' by J. Gordon Melton.

The Chronicle of Higher Education, which ran the list in its Feb. 20 edition, noted that several books had dropped from the list in the past year, including such reference works as ''Notable American Women'' and the ''Oxford American Dictionary,'' and such nonfiction studies as Thomas Sowell's ''Ethnic America'' and David Halberstam's ''The Powers That Be.''

Only nine books on the latest list were not on the list a year ago. They included Stanley Karnow's ''Vietnam: A History,'' Daniel Boorstin's ''The Discoverers'' and Barbara Tuchman's ''The March of Folly.''