SuperAPI AI Directory

consumption-tax

General & other

View repository

Updated 10-15 20:04

About this skill

Consumption Tax Calculation (消費税計算)

A skill to calculate the consumption tax amount from taxable sales and taxable purchases. It assumes that the assess skill has determined that the user is a taxable business operator for consumption tax and that the settlement skill has completed the closing of accounts. The calculation results are entered into the /e-tax skill (Claude in Chrome) in the e-Tax software for preparing tax returns.

Loading Settings (Execute First)

  1. shinkoku.config.yaml Read with the Read tool
  2. If the file does not exist, /setup guide the user to run the skill and exit
  3. Understand the setting values, and convert relative paths to absolute paths based on the CWD:
    • db_path: CLI script --db-path Used for arguments
    • output_dir: Base directory for output such as progress files
    • Each directory: Used when referencing files

Path Resolution Example

config の db_path が ./shinkoku.db で CWD が /home/user/tax-2025/ In the case of:

  • shinkoku tax calc-consumption --input /home/user/tax-2025/output/consumption_input.json

Loading Progress Information

After loading the settings, read the handover file to understand the results of the previous step.

  1. .shinkoku/progress/progress-summary.md Read with the Read tool (if it exists)
  2. Read the following handover documents with the Read tool (if they exist):
    • .shinkoku/progress/06-settlement.md
    • .shinkoku/progress/02-assess.md
  3. Use the loaded information in subsequent steps (avoid re-asking the user)
  4. If the file does not exist, skip it and directly confirm the necessary information with the user

Basic Policy

  • Start after confirming the assess skill's determination results (taxable business operator determination and filing method)
  • If the user is a tax-exempt business operator, inform them that no consumption tax return is required and exit
  • Perform calculations according to the filing method (2割特例/簡易課税/本則課税)
  • Accurately distinguish tax rate categories (standard rate 10%/reduced rate 8%)
  • Determine according to the classification rules in references/tax-classification.md

Confirmation of Preconditions

Before starting the consumption tax calculation, confirm the following:

  1. Whether the user is a taxable business operator: Confirm the assess skill's determination results
  2. Confirmation of the filing method: Confirm any of the following
    • 2割特例 (transitional measure for becoming a taxable business operator due to invoice registration)
    • 簡易課税 (already filed and taxable sales in the base period are 50 million yen or less)
    • 本則課税 (other than the above)
  3. Taxable period: Usually January 1 to December 31 (sole proprietor)
  4. Whether the book data is complete: The settlement skill's closing of accounts must be completed

Filing Method Determination Flow

Q1. インボイス登録により課税事業者になったか?
    かつ基準期間の課税売上が1,000万円以下か?
├── Yes → 2割特例の適用が可能 → Q2へ
└── No → Q3へ

Q2. 2割特例を適用するか?
├── Yes → 2割特例で計算
└── No → Q3へ(簡易課税・本則課税と比較して有利な方を選択可能)

Q3. 簡易課税制度選択届出書を提出済みで、
    基準期間の課税売上が5,000万円以下か?
├── Yes → 簡易課税で計算
└── No → 本則課税で計算

Step 1: Aggregation of Taxable Sales

Aggregate taxable sales from the books by tax rate category.ledger.py trial-balance や ledger.py search Calculate the following from the results of:

Aggregation Items

Item Description
Taxable sales (tax included) Aggregate separately for the 10% tax rate and the 8% reduced tax rate
Taxable sales (tax excluded) Tax base (rounded down to the nearest 1,000 yen)
Non-taxable sales Non-taxable transactions such as interest received
Tax-exempt sales Export transactions, etc. (if applicable)

Correspondence with account titles

  • Sales (4001): Normally taxable sales (tax_category = taxable)
  • Interest received (4100): Non-taxable sales (tax_category = non_taxable)
  • Miscellaneous income (4110): Determine taxable/non-taxable according to the nature

Step 2: Calculation of consumption tax amount

tax_calc.py calc-consumption call of

shinkoku tax calc-consumption --input consumption_input.json

Input JSON (ConsumptionTaxInput):

{
  "fiscal_year": 2025,
  "method": "special_20pct",
  "taxable_sales_10": 5500000,
  "taxable_sales_8": 0,
  "taxable_purchases_10": 0,
  "taxable_purchases_8": 0,
  "simplified_business_type": null,
  "interim_payment": 0
}

method options for:

  • special_20pct: 20% special exception (up to the taxable period including September 30, Reiwa 8. For sole proprietors, Reiwa 8 is the last year)
  • special_30pct: 30% special exception (newly established by the Reiwa 8 tax reform. Only for Reiwa 9 and Reiwa 10 of sole proprietors, for those who registered for invoices from tax-exempt businesses)
  • simplified: Simplified taxation (simplified_business_type required)
  • standard: Standard taxation

Output (ConsumptionTaxResult):

  • method: Applied filing method
  • taxable_sales_total: Total taxable sales (tax included, for display)
  • taxable_base_10: Tax base (10% portion, tax excluded, rounded down to the nearest 1,000 yen)
  • taxable_base_8: Tax base (8% portion, tax excluded, rounded down to the nearest 1,000 yen)
  • national_tax_on_sales: Consumption tax amount (national tax: 7.8% portion + 6.24% portion)
  • tax_on_sales: = national_tax_on_sales (backward-compatible alias)
  • tax_on_purchases: Deductible input tax amount (national tax portion)
  • net_tax: Tax amount after deduction (rounded down to the nearest 100 yen, only if positive)
  • refund_shortfall: Refundable tax amount due to insufficient deduction (if input > sales)
  • interim_payment: Interim tax payment amount
  • tax_due: Tax payment amount = net_tax - interim_payment
  • local_tax_due: Local consumption tax amount (tax amount after deduction × 22/78, rounded down to the nearest 100 yen)
  • total_due: Total tax payment amount (negative = refund)

Calculation logic for the 20% special exception

1. 課税標準額 = 税込売上 × 100/110(10%分)or × 100/108(8%分)
   → 1,000円未満切捨て(国税通則法118条)

2. 消費税額(国税)= 課税標準額 × 7.8%(10%分)+ 課税標準額 × 6.24%(8%分)

3. 差引税額 = 消費税額 × 20%
   → 100円未満切捨て(国税通則法119条)

4. 地方消費税 = 差引税額 × 22/78
   → 100円未満切捨て
  • Eligible are those who became taxable businesses by registering for invoices
  • Taxable sales in the base period must be 10 million yen or less
  • Applicable deadline: Up to the taxable period including September 30, Reiwa 8
  • No notification required (only state in the tax return that it is applied)

Calculation logic for simplified taxation

1. 課税標準額 = 税込売上 × 100/110(10%分)or × 100/108(8%分)
   → 1,000円未満切捨て(国税通則法118条)

2. 消費税額(国税)= 課税標準額 × 7.8%(10%分)+ 課税標準額 × 6.24%(8%分)

3. 控除対象仕入税額 = 消費税額 × みなし仕入率

4. 差引税額 = 消費税額 − 控除対象仕入税額
   → 100円未満切捨て(国税通則法119条)

5. 地方消費税 = 差引税額 × 22/78
   → 100円未満切捨て

Deemed input tax rate (by business category):

Business category Applicable business Deemed input tax rate
Type 1 Wholesale business 90%
Type 2 Retail business, agriculture, forestry and fisheries (food and beverages) 80%
Type 3 Manufacturing, agriculture, forestry and fisheries (other), construction, electricity and gas 70%
Type 4 Other (restaurant business, etc.) 60%
Type 5 Service business (transportation, communications, finance and insurance) 50%
Type 6 Real estate business 40%
  • Freelancers (IT, design, consulting, etc.) are usuallyType 5(deemed purchase rate 50%)
  • If operating two or more businesses, in principle calculate for each business category

Calculation logic for standard taxation

1. 課税標準額 = 税込売上 × 100/110(10%分)or × 100/108(8%分)
   → 1,000円未満切捨て(国税通則法118条)

2. 課税売上に係る消費税額(国税):
    標準税率分: 課税標準額 × 78/1000(= 7.8%)
    軽減税率分: 課税標準額 × 624/10000(= 6.24%)

3. 課税仕入に係る消費税額(国税):
    標準税率分: 税込仕入額 × 78/1100(= 7.8/110)
    軽減税率分: 税込仕入額 × 624/10800(= 6.24/108)

4. 差引税額 = 売上消費税額 − 仕入消費税額
   正の場合 → 100円未満切捨て(国税通則法119条)
   負の場合 → 控除不足還付税額(端数処理なし)

5. 地方消費税 = 差引税額 × 22/78
   → 100円未満切捨て
  • Retention of qualified invoices (invoices) is required for aggregating taxable purchases
  • Aggregate based on the consumption tax classification in the books (references/tax-classification.md)
  • If the taxable sales ratio is 95% or more and taxable sales are 500 million yen or less, full deduction is possible
  • For detailed requirements of the purchase tax credit under the invoice system, run /tax-invoice-credit-context

Step 3: Comparison of filing methods (optional)

If multiple methods can be selected, estimate the tax amount for each and present a comparison table.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
消費税の申告方法比較
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

| 方法 | 納付税額 | 備考 |
|------|---------|------|
| 2割特例 | ○○,○○○円 | 届出不要 |
| 簡易課税 | ○○,○○○円 | 届出が必要 |
| 本則課税 | ○○,○○○円 | インボイス保存要 |

→ 最も有利な方法: [方法名](差額: ○○,○○○円)

Step 4: Presentation of calculation result summary

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
消費税の計算結果(令和○年分)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

■ 基本情報
  申告方法:           [2割特例 / 簡易課税 / 本則課税]
  課税期間:           令和○年1月1日〜12月31日

■ 課税売上
  標準税率(10%)対象:  ○,○○○,○○○円
  軽減税率(8%)対象:     ○○○,○○○円
  課税売上高合計:     ○,○○○,○○○円

■ 消費税額
  課税売上に係る消費税額:     ○○○,○○○円
  控除対象仕入税額:           ○○○,○○○円
  差引税額:                   ○○○,○○○円
  中間納付税額:                     0円
  -----------------------------------------
  消費税の納付税額:           ○○○,○○○円
  地方消費税の納付税額:        ○○,○○○円
  合計納付税額:               ○○○,○○○円

■ 次のステップ:
  → /e-tax で確定申告書等作成コーナーに入力する(Claude in Chrome)
  → /submit で提出準備を行う
  → 消費税の納付期限: 令和○年3月31日
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Output of handover document

After presenting the summary, output the following file with the Write tool. This allows results to be carried over to the next step even if the session is interrupted or Compact occurs.

Output of step-specific files

.shinkoku/progress/08-consumption-tax.md Output in the following format to:

---
step: 8
skill: consumption-tax
status: completed
completed_at: "{当日日付 YYYY-MM-DD}"
fiscal_year: {tax_year}
---

# 消費税計算・申告書作成の結果

## 申告方法

- 適用方法: {2割特例/簡易課税/本則課税}

## 課税売上

- 標準税率(10%)対象: {金額}円
- 軽減税率(8%)対象: {金額}円
- 課税売上高合計: {金額}円

## 消費税額の内訳

- 課税売上に係る消費税額: {金額}円
- 控除対象仕入税額: {金額}円
- 差引税額: {金額}円

## 地方消費税

- 地方消費税額: {金額}円

## 合計納付税額

- 消費税の納付税額: {金額}円
- 地方消費税の納付税額: {金額}円
- **合計納付税額: {金額}円**

## 次のステップ

/e-tax で確定申告書等作成コーナーに入力する(Claude in Chrome)
/submit で提出準備を行う
消費税の納付期限: 令和{年}年3月31日

If consumption tax filing is not required (tax-exempt business), set status to skipped and describe the content as "No filing required as a tax-exempt business".

Update of progress summary

.shinkoku/progress/progress-summary.md Update (create new if it does not exist):

  • YAML frontmatter: fiscal_year, last_updated (current date), current_step: consumption-tax
  • Table: Update the status of all steps (set consumption-tax to completed or skipped)
  • Describe guidance for the next step

Guidance after output

After outputting the file, tell the user the following:

  • "The handover document has been saved to .shinkoku/progress/ . Even if the session is interrupted, results can be carried over to the next skill."
  • Guidance for the next step

Disclaimer

  • This calculation is based on general consumption tax calculation logic
  • The determination of business categories for simplified taxation may differ depending on individual circumstances
  • It is recommended to confirm the final filing content with a tax accountant or other professional