The amount that the rod extends beyond the trim is called the "overhang". Typically, you'll want the rod to extend beyond the edges of the window trim / frame as this gives you room to stack the drapes to the sides without blocking the window. A normal range for overhang would be something between 4" to 12" on each side, but it depends on several factors such as the size of your window or door, how much space you have to work with, what you want it to look like, how much fabric you have, etc.
The clearance is the distance from the wall to the back of the rod, or the ceiling to the top of the rod in the case of a ceiling mount. Clearance is affected by:
- Anything you need to clear such as thick trim and/or an under treatment (e.g., blinds).
- The depth of your fabric when stacked back, which is determined by the ring spacing. The most common center to center ring spacing is 5” to 7", and this gives a depth (from the center of the rod) of 2 ½” to 3 ½”.
Generally, so long as your ring spacing is no more than about 7" and your trim sticks off the wall by no more than 1", a 3" clearance works well.