Practical case
Don APG has obtained the following income in 2022:
 Reduced net return on work: 50,000
 Reduced net return on economic activity: –5,000
 Imputation of real estate income: 300
 Capital gain to be integrated into the general tax base: 4,500
 Capital loss to be included in the general tax base: 9,600
 Negative return on movable capital: –800
 Capital gain to be included in the tax base of savings: 5,600
 Capital loss to be included in the tax base of savings: 1,600
Likewise, the taxpayer has pending compensation for the following items from the years indicated:
 Negative net balance of capital gains and losses not derived from the transfer of assets corresponding to 2018: 600
 Negative net balance of capital gains and losses derived from the transfer of assets corresponding to 2018: 700
 Negative movable capital returns corresponding to 2018: 500
 Negative net balance of capital gains and losses derived from the transfer of assets corresponding to 2019: 2,100
Carry out the integration and compensation of said income in the 2022 tax return.
Solution:
1. Integration and compensation of income in the general tax base:

Yields and income allocations for fiscal year 2022:
 Job: 50,000
 Economic activity: 5,000
 Imputation of real estate income: 300
 Net balance (50,000 – 5,000 + 300) = 45,300

Capital gains and losses for fiscal year 2022 to be integrated into the general tax base:
 Profits: 4,500
 Losses: 9,600
 Negative net balance of profits and losses for fiscal year 2022 (4,500 9,600) = – 5,100

Compensation of the negative balance of capital gains and losses for the 2022 fiscal year itself:
Compensation of the negative net balance of 2022: 5,100
 Compensation of negative items from previous years:
Compensation negative net balance losses 2018: 600

Total compensations (5,100 + 600) ^{(1)} = 5,700
The maximum amount of compensation for the negative net balances of capital gains and losses for 2018 and 2022 is 25% of the positive balance of the returns and income allocations before said compensations. In this case 11,325 euros (25 per 100 s/45,300). Therefore, the entire outstanding amount (5,700 euros) may be compensated.

General tax base (45,300 – 5,700) = 39,600
2. Integration and compensation of income in the savings base:

Capital gains and losses for fiscal year 2022 to be included in the savings tax base:
 Profits: 5,600
 Losses: 1,600
 Positive net balance of profits and losses for fiscal year 2022 (5,600 – 1,600) = 4,000

Compensation of the negative balance of movable capital returns for the year 2022 itself:
Negative capital returns furniture attributable to 2022^{(2)}: 800
The negative capital gains for the year will be offset by the positive balance of the capital gains and losses for the year of the savings tax base with a limit of 25 percent of said positive balance, which amounts to 1,000 (25 percent s/4,000 ). This clears all outstanding balances.

Compensation of negative net balance of capital gains and losses from previous years:
 Compensation negative net balance of losses 2018: 700
 Compensation negative net balance of losses 2019: 2,100

Compensation for negative net balance of capital gains from 2018^{(3)}: 200
The negative capital gains from 2018 can be offset by the positive balance of capital gains and losses for fiscal year 2022 up to the joint limit of 25% of said balance. In this case, up to 200 euros since the compensation for the negative balance of capital gains from 2022 itself amounted to 800 and the limit was 1,000 euros (25 per 100 s/4,000).

Total compensations (700 + 2,100 + 200) = 3,000
 Compensations to be made (up to the amount of the positive balance): (800 + 3,000) = 3,800

Savings tax base (4,000 – 3,800) = 200