Laminate flooring won't fit tight against most fireplaces. Some carpenters use a special saw to undercut the rock so the flooring fits under it, but nothing looks better than trimmed flooring cut to fit. It might be more work, but it adds the look of craftsmanship to your floor.
Trimming laminate should start at the fireplace, with a custom cut that follows the contours of the fireplace stone or other material. Once the custom-fitted end is done you can cut the laminate piece to length (if only one piece is need for the row) or install subsequent pieces to complete the row. If you see gaps where the laminate meets the fireplace, it might require the use of a scribe tool. A scribe tool looks like a compass with a small metal arm and a pencil. The difference is the metal arm on the scribe tool is flat, while a compass has a sharp, pointed arm. If you don't have a scribe tool, it's fine to use a compass. The scribe tool or compass works by sliding it along the fireplace material, transferring the shapes to the laminate.
Cut and Fit
Jigsaws equipped with a fine-cutting blade work best to cut laminate. For cleaner cuts, clamp the laminate across two sawhorses before cutting it. If there's only a small amount of material to remove, it's fine to shape the end with a belt sander or even an orbital sander. Test the fit before moving on; trial and error is one way carpenters get tight joints. If you still see a gap, adjust the scribe tool, scribe again and trim off more. For better fits, it's possible to use the sander to bevel the ends of each piece. Also known as back-cutting, it consists of beveling the bottom edge of each piece so the top, fresh-cut edge touches the rock before the bottom does.