DecCF./ˈdɛk.ɛf/

Swedish tax on the sale of a private home

Calculate the gain or loss when selling a privately owned Swedish house or tenant-owned apartment. The calculation can reinstate a previous tax deferral, calculate a new final deferral and provide the capital-income tax basis for the annual income-tax assessment.

All amounts are in SEK for the seller represented by the model. For joint ownership, enter that seller's amounts. ownershipShare affects the deferral cap; it does not scale prices, costs or gains a second time.

Use the calculation in a model

The contract period determines the tax year. The settlement period determines when sale proceeds, selling costs and final mortgage repayment affect cash. Periods are zero-based monthly indexes: 0 is the model's first month, and 9 is its tenth.

taxBases supplies the sale's signed capital-income basis to the ordinary annual assessment. That assessment combines the sale with the person's other capital income and deductions, preliminary payments and income-tax rules. sale.outputs.breakdown publishes the detailed result as SEK amounts. sale.outputs.settlement moves sale proceeds only in the selected settlement period.

Set bookSettlement: false if another housing plan already records the same sale transaction. The gain, deferral and capital-income basis remain available, while this component adds no sale, cost or loan postings.

How the gain is calculated

For a house, the current gain is the sale price minus selling costs, purchase price, deductible purchase costs and qualifying improvement expenses. Selling costs can include an agent's fee. Purchase costs can include the land-registration fee and mortgage-deed costs.

For a tenant-owned apartment, the same calculation is adjusted for capital contributions and the internal repair-fund balance at sale, which reduce the gain, and the internal repair-fund balance at purchase, which increases it.

The final mortgage repayment reduces the amount left in cash, but does not affect the taxable gain.

Improvement expenses

For each calendar year, expenses are grouped by ROT tax credit and insurance compensation. The year's combined expenses must reach SEK 5,000; otherwise that year's deduction is zero. ROT credits and insurance compensation reduce the expense.

  • Capital improvements can be included throughout the ownership period. They cannot be deducted for years before 1952 for a house or before 1974 for a tenant-owned apartment.
  • Repairs and maintenance can be included for the sale year and the five preceding years. Set deductibleShare to the share of the cost after compensation that reflects an improvement in condition compared with when the home was purchased. Use zero if the condition did not improve.

The calculation cannot determine from invoices whether work actually improved the home's condition. The seller must classify the expense and enter the share.

Previous and new tax deferrals

previousDeferral is added back to the current gain before a new deferral is calculated. Without confirmed deferral eligibility and a replacement home, no new deferral is granted; any previous deferral remains part of the taxable result.

To calculate a new deferral, set deferralEligibilityConfirmed: true only after checking the conditions. The calculation does not determine residency, ownership, deadlines or EEA conditions.

If the replacement home costs less than the net sale proceeds, the deferral is the total gain, including any previous deferral, multiplied by the replacement home's comparable purchase price and divided by the net sale proceeds. The new deferral cannot exceed the gain or SEK 3,000,000 multiplied by the seller's ownership share. A new deferral must be at least SEK 50,000. If requestedDeferral is omitted, the maximum allowed deferral is used; enter zero to decline a new deferral or enter a lower amount within the limits.

The comparable price of a replacement house can include purchase costs and qualifying new construction, extensions or conversions. For a tenant-owned apartment, the purchase price is reduced by the internal repair-fund balance at purchase. Repairs and maintenance do not count as qualifying improvements to the replacement home's price.

Tax and cashflow

A positive taxable result is assessed at 22%. A loss produces a negative capital-income basis equal to 50% of the loss; the actual tax reduction is determined together with the person's other capital items and annual tax capacity.

The tax basis exists only in the contract year. With personalTax, it is included in the ordinary annual assessment and the subsequent tax settlement. The model must not add a separate payment of the estimated capital-gains tax.

More from the Swedish Tax Agency

Rules and brochures checked on 10 October 2026:

The brochures show detailed calculation rows and examples from the tax forms. Follow the Swedish Tax Agency's current web guidance if a later rule differs from an older brochure.