Getting the sizing right here is more consequential than most other shelf placements because the shelf's relationship to the firebox is visible and proportional from across the room.
Length of the flanking shelves should relate to the available wall section between the fireplace and the nearest corner, door, or window. A shelf that runs most of the available wall width looks intentional. One that's clearly undersized for its section looks placed rather than designed. Measure the full width of each flanking section and order close to that measurement, leaving a few inches on each end.
Depth usually runs at 8" to 10". Deep enough for books, ceramics, and display objects without the shelf projecting so far from the wall that it competes with the firebox visually. A 12" shelf works for heavier storage but can feel heavy on a wall where the firebox is already the dominant element.
Height of the bottom shelf on a flanking arrangement should typically align with or sit slightly above the top of the firebox opening. This creates a visual connection between the shelves and the fireplace rather than leaving them floating unrelated on the wall above. For stacked arrangements, the bottom shelf establishes the baseline and the shelves above follow consistent spacing from there.
Number of shelves depends on wall height and how much display area you want. Two shelves per side is the most common starting point. Three creates a more substantial presence. In a room with 9' or higher ceilings, three shelves on each side creates a built-in library effect that makes the whole wall feel truly finished.
For the full depth and spacing breakdown, the floating shelf depth guide and shelf spacing guide cover every variable in detail.