The answer to this is slightly more complicated than I think most would like. There's no easy way to calculate the total CR of an encounter; CR is one factor used in assessing Encounter Difficulty. (Which appears to be your actual question, assessing encounter difficulty). You (1) use CR to calculate the XP value of the encounter, and (2) then compare that to the Encounter Difficulty table (after applying the formula for multiple creatures) and (3) then compare that to the chart given on page 82 of the DMG.
The calculation process
Let's use level 4 characters
A level 4 character provides the XP thresholds of: 125 for easy, 250 for medium, 375 for hard, and 500 for deadly (this chart is on pg 82 of the DMG).
A party of 4 level 4's have the values of: 500, 1000, 1500, 2000 for easy, medium, hard, and deadly respectively. Now, you might be thinking "Oh, that's not too bad!" but we're not done here.
If you have 1 monster all you have to do is compare it's XP value to your formula and you're good to go! Like a CR 5 Bulette (1800 xp) is a Hard encounter for your PCs.
If you add more monsters page 82 provides more help in the form of another table.
- If you have 2 monsters you multiply their total XP by 1.5, if there's 3-6 you multiply by 2, and this continues.
Example Multi-Monster Encounter for that party.
If you have 3 CR 2 Ettercaps (450 XP each, modified to 2700 by formula) confront the party, it's a deadly (Probably much more than deadly) encounter for that party.
That same encounter for 4 5th level adventurers
From the XP Threshold table, a 5th level character's values are:
Simple: 250, Medium: 500, Hard: 750, Deadly: 1,100. (1000, 2000, 3000, 4400 for a party of four)
The same 3 Ettercap encounter is between Medium and Hard for the higher level party. (DMG suggests rounding down so it's a "Medium" encounter in this situation.
Too much math?
I agree! There's a website called Kobold Fight Club that will do all this math for you! All you need to do is input party size and level and select your monsters and you can see how difficult (and how much XP they'll get!) for an encounter