コンテンツにスキップ

コスト基準計算方法

対応メソッド

メソッドIDIRS 準拠備考
First In, First OutFIFO✅ デフォルト最も古いロットから売却
Last In, First OutLIFO⚠️ Specific IDSpecific ID を選択する必要あり
Highest In, First OutHIFO⚠️ Specific IDSpecific ID を選択する必要あり
Specific IDSPECIFIC_IDロットの手動選択
Germany FIFOGERMANY_FIFO🇩🇪§23 EStG、1年保有
PMPAPMPA🇨🇦 🇦🇺Adjusted Cost Base
Total AverageTOTAL_AVERAGE🌍平均コスト基準
UK Share PoolingUK_SHARE_POOLING🇬🇧Section 104 プール + 30日ルール

IRS に関する注記

IRS は仮想通貨に対して FIFOSpecific Identification を認めています(Rev. Rul. 2023-14)。LIFO と HIFO は技術的には Specific ID 戦略であり、ロットレベルの記録を維持し、選択した方法を一貫して適用する必要があります。

使用方法(コードブロック — 翻訳しない)

import { computeGains, compareAllMethods } from '@dtax/tax-engine';
const result = computeGains(transactions, { method: 'FIFO', taxYear: 2024 });
const comparison = compareAllMethods(transactions, 2024);
comparison.forEach(({ method, totalGain, recommendation }) => {
console.log(`${method}: $${totalGain} ${recommendation ? '← recommended' : ''}`);
});

結果の型

interface GainResult {
shortTermGain: number;
longTermGain: number;
totalGain: number;
disposals: Disposal[];
unrealizedGain?: number;
}