跳转到内容

计税方法

支持的方法

方法ID国家说明
先进先出FIFO🌍最早购入的份额优先出售(IRS 默认)
后进先出LIFO🌍需以 Specific ID 形式申报(IRS)
最高价先出HIFO🌍需以 Specific ID 形式申报(IRS)
指定批次SPECIFIC_ID🌍手动选择批次
德国 FIFOGERMANY_FIFO🇩🇪§23 EStG,持有 1 年免税
PMPAPMPA🇫🇷法国资本利得,加权平均
总平均成本TOTAL_AVERAGE🌍平均成本基础
英国份额池化UK_SHARE_POOLING🇬🇧Section 104 资金池 + 30 天规则
澳大利亚 CGT 折扣AU_CGT_DISCOUNT🇦🇺FIFO + 长期盈利享 50% 折扣(ATO s.115)
加拿大 ACBCA_ACB🇨🇦加权平均调整成本基础(CRA IT-387R2)
韩国虚拟资产KR_VIRTUAL_ASSET🇰🇷FIFO;22% 统一税率 + 250 万韩元免征额(报告层)
印度 VDAIN_VDA🇮🇳FIFO;亏损不可抵扣(s.115BBH)
西班牙 CGTES_CGT🇪🇸FIFO;19–27% 累进税率(报告层)

IRS 说明

IRS 允许加密货币使用 FIFOSpecific Identification(Rev. Rul. 2023-14)。LIFO 和 HIFO 在技术上属于 Specific ID 策略 — 你必须维护批次级别的记录并持续应用所选方法。

使用方法

import { computeGains, compareAllMethods } from '@dtax/tax-engine';
// Single method
const result = computeGains(transactions, {
method: 'FIFO',
taxYear: 2024,
});
// Compare all comparable methods (excludes SPECIFIC_ID)
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;
}