Mathematics is unusual among subjects in that its history can be read two ways: as a story about people, or as a story about ideas that still hold. The books that only do the first produce a pleasant series of anecdotes about eccentrics; the books that only do the second are indistinguishable from textbooks. The reading order below alternates deliberately, because the anecdotes stick when you have seen the mathematics they attach to.
There is also a specific hazard in this field that a reading list should warn you about, and it comes late in this path: one of the most influential and enjoyable books ever written about mathematicians is also substantially unreliable as history. Better to know that before you read it than after.
Start with the theorems
Journey Through Genius by William Dunham is the ideal opening. It selects a dozen landmark theorems — from Hippocrates through Cantor — and actually walks you through the proofs, with the historical setting around each one. The mathematics is genuinely accessible with school algebra, and it gives you something the pure narrative histories cannot: the experience of seeing why a result mattered.
Fermat's Last Theorem by Simon Singh follows one problem across three and a half centuries to Andrew Wiles's proof, and it is the best-constructed popular mathematics narrative of the last few decades. Zero by Charles Seife takes the opposite approach — a single concept traced through cultures — and is lighter and more speculative; some historians find its broad claims about zero's philosophical consequences overstated, which is worth holding in mind without spoiling the read.
The standard surveys
A History of Mathematics by Carl Boyer, later revised by Uta Merzbach, is the reference survey: comprehensive, chronological, and written to be consulted as much as read. This is the book to keep while you read the others.
The Crest of the Peacock by George Gheverghese Joseph exists because that traditional survey tradition centred Greece and Europe, and Joseph documents the mathematics of Egypt, Mesopotamia, India, China and the Islamic world in detail — including results that reached Europe centuries later and were credited there. Whether particular transmissions occurred is still argued over; that the standard narrative was too narrow is now broadly accepted.
Mathematics and its history by John Stillwell is the bridge to real mathematics. It is a history organised as a mathematics course, with exercises, and it is the right book if you have the equivalent of a first-year undergraduate background and want the historical development to teach you the subject itself.
The lives
The Man Who Knew Infinity by Robert Kanigel is the biography of Srinivasa Ramanujan and his collaboration with G. H. Hardy — the best written of any book here, and unusually good on what it costs to be an outsider in a formal discipline. Euler by William Dunham returns to the theorem-by-theorem method for the most prolific mathematician who ever lived, and is the natural companion to Dunham's earlier book.
Then Men of mathematics by E. T. Bell, with a warning attached. It has drawn readers into mathematics for ninety years and is enormously entertaining. It is also inaccurate in ways historians have documented at length: Bell embellished, invented dialogue and motive, and his celebrated chapter on Évariste Galois is substantially fiction. Read it as a Victorian-styled work of literary hero-making, not as a source, and do not repeat its stories without checking them.
The arguments
Infinite Powers by Steven Strogatz is a modern historical account of calculus that doubles as an explanation of it, and is the most enjoyable book on this path for a reader without technical training. Prime Obsession by John Derbyshire alternates chapters of history and mathematics to explain the Riemann hypothesis, and does so well; the author's political journalism has been the subject of considerable controversy, which is separate from the mathematics exposition in this book.
Close with Mathematics, the loss of certainty by Morris Kline, an openly polemical account of how mathematicians lost the belief that they were discovering necessary truths about reality. Not everyone accepts Kline's framing, and reading it last means you can push back. Explore the reading path in order rather than starting with the survey — the theorems come first for a reason.
Follow the full ordered path here: How to Read the History of Mathematics, in Order.