Center the carpet in the room and attach it per the methods of your manufacturer (tack strips, tape, etc.). Whenever you install carpet, there is meant to be an extra 4 to 6 inches to allow for any mistakes in measurement; this amount of excess carpet may increase as you stretch the carpet.
Determine the pile of your carpet, which is the amount of fluff on top. For regular-pile carpets, you will cut through the carpet backing to remove excess. For loop-pile carpets, you will cut through the face of the carpet to avoid unwinding the pile.
Cut through the carpet in the appropriate direction using a sharp utility knife. Work slowly and in straight line to remove all excess carpet. Work your way around the room until you have trimmed all edges.
Press the newly-trimmed carpet edges down so that they lie flat. Trim off any pieces you may have missed or areas where you deviated slightly from the straight line. Run you hands along the edges to fluff up the pile to make it blend with the rest of the rug.