Home / Market / setsuzei japan tax savings

setsuzei japan tax savings

Estimate how much Japanese income and resident tax a freelancer can still save before year-end (furusato nozei limit, iDeCo, mutual aid, blue-return deduction) by running the setsuzei CLI.

skill★ 509200 dlgithubCC-BY-4.0 content; MIT code; upstream exceptions applyInstall in CosmosUpstream Source

Documentation & Preview

--- name: setsuzei-japan-tax-savings description: "Estimate how much Japanese income and resident tax a freelancer can still save before year-end (furusato nozei limit, iDeCo, mutual aid, blue-return deduction) by running the setsuzei CLI." category: finance risk: safe source: self source_type: self date_added: "2026-11-26" author: ozko00 tags: [japan, tax, freelance, furusato-nozei, ideco, finance, cli]

---

Setsuzei: Japanese Year-End Tax Savings Estimate

Overview

Estimates Japanese national income tax and local resident tax for a freelancer or a person with a side job, and how much each of four year-end measures would still reduce them: furusato nozei (hometown tax donation), iDeCo, Small Enterprise Mutual Aid (shokibo kigyo kyosai), and the blue-return special deduction (aoiro shinkoku, 100k / 550k / 650k yen).

The skill does not let the model do tax arithmetic. It collects the user's projected figures, runs the open-source setsuzei CLI (https://github.com/ozko00/setsuzei, MIT), and explains the CLI's JSON output. Rates and thresholds live in the CLI's data file with a primary-source URL per number (National Tax Agency, Ministry of Internal Affairs and Communications, e-Gov).

Scope: tax year 2026 (Reiwa 8) income tax and the fiscal 2027 resident tax that follows from it. Other skills in this catalog cover bookkeeping registers and accounting setups; none computes Japanese personal tax.

When to Use

Prerequisites

How It Works

1. Establish the inputs

Ask for yearly projected amounts in yen. Start with the required items. If the user leaves optional inputs unspecified, identify the assumptions or defaults that affect the estimate. Never infer eligibility or a municipality-specific rate.

Required:

| Ask for | JSON key | | --- | --- | | Salary income, if any (the "payment amount" on the withholding slip) | salaryRevenue | | Freelance / side-job sales | businessRevenue | | Business expenses | businessExpenses | | Business income or miscellaneous income | businessIncomeType: "business" / "misc" | | Expected blue-return deduction ("none" for a white return) | blueReturn: "none" / "10" / "55" / "65" | | Social insurance premiums paid in the year | socialInsurance |

Optional: idecoPaid, kyosaiPaid, furusatoPaid, spouse ({ "income": 0, "age70OrOlder": false }, where income is total income, not salary), dependents ({ "under16", "general", "specific", "elderly", "elderlyCohabiting" }), incomeAdjustment (true when salary exceeds 8.5 million yen and there is a dependent under 23 or a specially disabled person; applied automatically when under16 or specific is above 0), idecoAdditional (see below), otherDeductions, idecoAnnualLimit, nhiIncomeRatePercent (only when the user knows their municipality's rate; never guess it).

Always ask about two items that are easy to miss:

Do not decide for the user what counts as an expense or which income category applies; ask them.

2. Get the CLI (first time only, with the user's approval)

The CLI is published on npm as setsuzei. It is built and published from the public repository by GitHub Actions with npm trusted publishing, so the npm page shows where and how each version was built. This skill pins version 0.3.1.

First check whether a usable CLI is already installed; if this prints 0.2.2 or higher, use it and skip the download:

setsuzei --version

Otherwise, before downloading anything, tell the user that version 0.3.1 of the setsuzei package (under 1 MB, no dependencies) will be downloaded from the npm registry into the npm cache and run locally, and wait for approval. Then check the version; it must print 0.3.1:

npx --yes setsuzei@0.3.1 --version

Use npx --yes setsuzei@0.3.1 for every later command.

3. Perform the task

Pass the inputs as JSON on standard input through a process API. Do not put real user figures in shell commands, shell history, or files. The following shell example uses synthetic values only:

echo '{"businessRevenue":8000000,"businessExpenses":1500000,"businessIncomeType":"business","blueReturn":"65","socialInsurance":900000,"idecoPaid":276000,"furusatoPaid":30000}' \
  | npx --yes setsuzei@0.3.1 --input - --json

Exit code 2 means invalid input; read error.issues on standard error and fix the input or ask the user. To compare conditions (for example "only 100,000 yen more into iDeCo"), set idecoAdditional / kyosaiAdditional and run the CLI again for each condition.

Read the result from these fields:

| Question | Field | | --- | --- | | Current income tax / resident tax / total | baseline.incomeTax.total / baseline.residentTax.total / baseline.totalTax | | Furusato nozei limit and remaining room | measures.furusato.limit / .remaining | | iDeCo remaining room, the additional payment that was evaluated, and its saving | measures.ideco.remaining / .additional / .saving.total | | Mutual aid remaining room, the additional payment that was evaluated, and its saving | measures.kyosai.remaining / .additional / .saving.total | | The amount beyond which a further contribution no longer lowers tax (null when the whole room is effective) | noEffectBeyond on measures.ideco / measures.kyosai | | Tax for each blue-return level | measures.blueReturn.options[] | | Combined plan: furusato nozei plus mutual aid, and iDeCo only when idecoAdditional was given. Saving and the total additional payment | measures.combined.saving.total / .totalPayment | | How much of that saving comes from contributions and how much from furusato nozei | measures.combined.savingFromContributions / .savingFromFurusato | | The same plan if the remaining iDeCo room can also be paid this year (reference; null when not applicable) | measures.combinedWithIdeco | | Whether the income-based part of resident tax is exempt or reduced by the exemption threshold | baseline.residentTax.incomeLevyExempt / .exemptionReduction | | Why a measure was not computed | applicable: false and notes on that measure | | Input-dependent cautions | warnings |

4. Verify the result and report

Examples

User request: 今年あといくら節税できる? フリーランスで売上800万、経費150万、青色65万、社会保険料90万、iDeCo 27.6万、ふるさと納税3万済み。
Inputs: {"businessRevenue":8000000,"businessExpenses":1500000,"businessIncomeType":"business","blueReturn":"65","socialInsurance":900000,"idecoPaid":276000,"furusatoPaid":30000}
Expected result: current tax 780,000 yen (income tax 375,400 + resident tax 404,600); furusato nozei limit 123,000 yen with 93,000 remaining; mutual aid saving 241,700 yen for 840,000 more; combined plan (mutual aid 840,000 + furusato nozei 56,000 more, 896,000 paid in total) saving 297,700 yen, of which 56,000 is furusato nozei; iDeCo saving 164,300 yen for 540,000 more only if the provider confirms the increase can count for this year, in which case the combined plan becomes 393,800 yen for 1,423,000 paid. These are the CLI's outputs for this input at the pinned commit.

Limitations