Although winding up with so much in capital losses that they exceed your client's capital gains doesn't make anyone happy, it does happen and even has a bright side (sort of). The bright side would be that capital losses that exceed the amount of capital gains for the current year could be carried forward to offset the following years capital gains until your client's capital losses have been used up.
Capital losses incurred in excess of capital gains can only be used to offset capital gains up to the amount of the capital gains. That means if your client has $15,000 in capital losses and only $5,000 in capital gains for the year, you can only apply $5,000 of the $15,000 in losses to offset their gain. However, your client is entitled to deduct up to $3,000 of what is leftover in capital losses from their income using Schedule D. For married people filing separately, this amount is limited to $1,500 each. For this example, that leaves $7,000 that can be carried forward to the next year when the process starts all over again.
Keep in mind that your client cannot just choose whatever losses they would like to offset whatever gains they may like. There are specific rules to be followed here. The first step is to offset all your client's short-term gains with their short-term losses. Next they offset all of their long-term gains with their long-term losses. Then your client must offset these two results. What they need to be careful of is being forced to offset long-term gains with short-term losses when they have large short-term losses and small short-term gains. Your client does not have to do this and may choose to wait for a future tax year when they may have a large amount of short-term gains that could use the carried-over short-term losses to offset them. Generally, they will want to try to keep their long-term gains intact because of their preferred tax rate.
The rules that apply to offsetting and carrying-over capital losses can seem rather confusing. For additional information on capital losses and carryovers, see IRS Publication 544, Sales and Other Dispositions of Assets, Publication 550, Investment Income and Expenses and Publication 551, Basis of Assets.