When you're designing an encounter and you plan on traps being part of it, how do you calculate the CR of that? Does 5e take that into account some where? Or do I just ignore it and calculate the monsters only?
The Dungeon Master's Guide gives some advice about this on page 85. (Technically the section starts on page 84, but it doesn't really say anything on page 84.)
Increase the difficulty of the encounter by one step (from easy to medium, for example) if the characters have a drawback that their enemies don't. Reduce the difficulty by one step if the characters have a benefit that their enemies don't. Any additional benefit or drawback pushes the encounter one step in the appropriate direction. If the characters have both a benefit and a drawback, the two cancel each other out.
So, if the characters are affected by the traps and their enemies aren't, the difficulty is considered to be one step higher. However, if the traps affect the characters and the enemies equally, it has no effect on the difficulty.