Baseboard installed on top of carpet should be installed at approximately the same height with this exception.
Install baseboard or carpet first.
How to install carpet first.
A really thick shag carpet can make it difficult to judge how high to place the trim.
In my house they had to go from carpet to tile and lino.
Many builders do not install flush to the floor compensating for height of carpet.
Ask your carpet installer their preference to begin the discussion.
Or you may be replacing the baseboards but leaving the carpet.
The first is to install the baseboards flush to the subfloor prior to carpet installation.
There may be instances where you want to put the carpet down first.
If you are not intending to install quarter round or base shoe the baseboard.
Generally the installation of carpet or baseboard is easier for whoever installs first.
The baseboard goes in first always the carpet installers don t like this if they have to install new thicker baseboard for the customer they have to remove the old tack and install new this is very time consuming and their usually on piece work.
This could result in a tight fit based upon how close to the wall the tack strips are placed normally the old tack strips are not replaced when installing new carpet.
Nice taller baseboards should frame the room first prime caulk and base coat as above before you install carpet.