0. measure the width of your radiator legs
1. Put some masking tape on the front of the radiator at each end.
2. Take a piece of carpet (preferably one of those door mat size pieces that carpet stores sell for $2 each that's about as thick as the one your installing) and slide it under the radiator beside the legs until it hits the wall or baseboard. Kneel on the front end of the carpet so it doesn't move. Now pull the carpet out from under the radiator and run it up the front of the radiator. Press the carpet tightly down against the floor in front of the radiator so that it makes as close to a 90 degree angle where it bends to go up in front of the radiator as possible. Mark the masking tape at the elevation of the edge of the carpet. Do that at both ends of the radiator.
3. Now, take a tape measure and measure the distance from the wall to the rear leg and the front leg of the radiator. Measure down from the mark on the masking tape those same distances, and do that for both ends of the radiator.
When you spread out the carpet inside the room, you'll initially want to have the edge of the carpet running up to a few inches higher than those marks. That way, the carpet will run up the wall a few inches on both sides of the radiator so that you can use your wall trimmer to cut the carpet to conform to the curvature of the wall (if any).
4. Wait until you have the carpet stretched across the room in front of the radiator (so your cuts won't move), and while pressing the carpet into a tight 90 degree angle in front of the radiator legs, mark the edge of the carpet on the masking tape at both ends of the radiator. Also mark the radiator leg locations on the back of the edge of the carpet. They will typically be directly under the edge of the radiator.
5. Pull the carpet back away from the radiator so it's laying flat on the floor, and use a carpenter's square or any 90 degree angle you trust to draw lines on the back of the carpet (perpendicular to the edge of the carpet) where the radiator ends are. That should also be where the radiator legs are. Since you know the width of the radiator legs, it's a good idea to draw two lines perpendicular to the edge of the carpet at each end of the radiator, to mark the inside and outside edges of the radiator leg. That way you can cut the carpet to fit under the radiator along the inside edge of the radiator leg where the cut is less visible.
6. Measure between the marks made on each end of the carpet, and cut that much off the edge of the carpet between the radiator legs.
7. When you press the carpet down into a tight 90 degree angle, the edge of the carpet should now come up to the original marks on your masking tape. You want to be sure that the carpet doesn't rise up to above those marks because then it'll be too long and won't lay flat under the radiator. If the edge of the carpet is below those marks, then mark the edge of the carpet on the masking tap in a different colour this time.
8. Now, pull the carpet back away from the radiator, measure the distance between the original or different colour mark and front and back leg marks on your radiator and transfer that distance to the perpendicular lines on the back of the carpet. Do that at each end of the radiator.
9. Slide some plywood or scrap paneling or something under the edge of the carpet to protect the carpet underneath, and cut along the inside perpendicular line at each end of the radiator and along the outside line only where the legs are.
When doing the cutting, keep in mind that you can cut carpet in tight spots (like the end of your perpendicular line where the front of the front radiator leg will be) with wire cutters. You just kind fold one side of the carpet down at that spout to allow you to sneak a pair of wire or side cutters in there. You have to squeeze pretty hard, but you do get a nice clean cut.
9. Now, start at one end of the radiator and work the carpet in under the radiator with your hands. It's a good idea to staple the carpet down along the cut lines where you can get a staple gun in.
Also, you'll often find that there will be small gaps under the walls if you take off any shoe molding or baseboards. It's an excellent idea to vaccuum that dust up. Dust is 80 percent organic matter, like linen fibers from bed sheets, cellulose fibers from paper (especially toilet paper), dead skin cells, pollen, etc. It forms a food supply for insects. By vaccuum up dust, you remove an important source of food for them, and so your house will be able to support a smaller population of insects.
Hope this helps.