Skip to content
Back to skills

Setsuzei Japan Tax Savings

ASecurity

Estimate Japanese income and resident tax a freelancer can still save by year-end (furusato nozei, iDeCo, mutual aid, blue return), plus medical and life-insurance deductions and tax-return fields.

  • 50,717 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 27, 2026
ai-agentsrustgoshellbashnodegitapi

Works with

  • cli
  • api
  • mcp

Security analysis

A100/100

Scanned December 2, 2026

npx -y skills add sickn33/agentic-awesome-skills --skill setsuzei-japan-tax-savings --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Setsuzei Japan Tax Savings?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Setsuzei Japan Tax Savings
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/sickn33-setsuzei-japan-tax-savings/badge)](https://www.skillsdirectory.com/skills/sickn33-setsuzei-japan-tax-savings)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: setsuzei-japan-tax-savings
description: "Estimate Japanese income and resident tax a freelancer can still save by year-end (furusato nozei, iDeCo, mutual aid, blue return), plus medical and life-insurance deductions and tax-return fields."
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). It also computes two deductions that are claimed on the return, the medical-expense deduction (compared with the self-medication regime) and the life-insurance premium deduction, and lists which fields of the final tax return (kakutei shinkokusho, forms 1 and 2) the amounts go in.

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

- The user asks, in Japanese or English, how much Japanese tax they can still save this year, what their furusato nozei limit is, how much iDeCo or shokibo kigyo kyosai would save, or what the difference between blue-return deduction levels is.
- The user asks whether the medical-expense deduction or the self-medication regime lowers tax more, how much the life-insurance premium deduction is, or which field of the final tax return an amount goes in.
- The user is self-employed in Japan (sole proprietor / freelancer) or an employee with side-job income.
- Do not use it for corporate tax, consumption tax, or tax years other than 2026. It lists the return fields and amounts; it does not prepare or file a return.

## Prerequisites

- Node.js 20 or later (with `npx`).
- Network access once, to download the `setsuzei` package from the npm registry. The package has no dependencies. The calculation itself runs offline and sends nothing.
- Under 1 MB of disk space in the npm cache.

## 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), `medicalExpenses` and `medicalReimbursed`, `selfMedicationExpenses`, the life-insurance keys (see below), `dependentUnder23`, `otherDeductions` (other income deductions such as earthquake insurance; not medical expenses or life-insurance premiums), `idecoAnnualLimit`, `nhiIncomeRatePercent` (only when the user knows their municipality's rate; never guess it).

Always ask about two items that are easy to miss:

- **Dependents under 16.** They give no dependent deduction, but they raise the income threshold below which the income-based part of resident tax is not charged. Put the count in `dependents.under16`, not in `general`. For a low-income household, leaving it out makes resident tax and the furusato nozei limit come out higher than they really are.
- **How much more the user can put into iDeCo within this year.** Set `idecoAdditional` only when the user has confirmed the amount with their iDeCo provider. A contribution amount can be changed once a year and lump-sum contributions need a prior filing, so late in the year an increase often cannot count for this year. If the user does not know, leave it out.

Ask about these when the user mentions medical costs, insurance premiums, or filling in the return:

- **Medical expenses.** `medicalExpenses` is what the user paid in the year for themselves and family members living on the same budget; `medicalReimbursed` is the part covered by insurance payouts or high-cost medical benefits (per benefit, no more than the expense it covers). `selfMedicationExpenses` is the purchase cost of medicines covered by the self-medication regime, and applies only when the user confirms they had a health check-up, vaccination, or similar in the year. Enter both when both are known: the CLI picks the one with the lower tax, and the two cannot be combined. Do not decide which is better yourself.
- **Life-insurance premiums.** Take the amounts from the insurers' deduction certificates: `lifeInsuranceNew` / `lifeInsuranceOld` (general life insurance, contracts from 2012 on / up to 2011), `medicalCareInsurance` (care and medical insurance), `pensionInsuranceNew` / `pensionInsuranceOld` (individual pension insurance).
- **A dependent under 23.** Set `dependentUnder23` to `true` when there is one (for example a child aged 16 to 18). It is used for the tax year 2026 special rule for the life-insurance premium deduction and for the income adjustment deduction; it is applied automatically when `under16` or `specific` is above 0.
- For questions asked at filing time ("where do I write this", "how much do I pay"), enter the year's actual amounts instead of projections.

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`](https://www.npmjs.com/package/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.6.1`.

First check whether that version is already installed; if this prints exactly `0.6.1`, use it and skip the download:

```bash
setsuzei --version
```

Otherwise, before downloading anything, tell the user that version `0.6.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.6.1`:

```bash
npx --yes setsuzei@0.6.1 --version
```

Use `npx --yes setsuzei@0.6.1` for every later command.

- Do not use an installed `setsuzei` that prints any other version, older or newer. The inputs, fields, and example output in this skill were checked against 0.6.1 only: versions before 0.6.0 reject the medical-expense and life-insurance inputs as unknown keys and do not output `deductionDetails` or `filing`.
- Keep the version pinned. Do not switch to `@latest`, an unpinned `npx setsuzei`, or a newer version without the user asking for it.
- The package goes to the npm cache, not into any skills, plugin, hook, or agent-configuration directory. It has no runtime dependencies and no install scripts.
- If a command is stopped by a permission prompt or denied, do not rephrase and retry it. Ask the user to run it themselves or to allow it.
- Version 0.6.1 also contains a local stdio MCP server (`setsuzei mcp`). Before sending any income, household or medical figures to `estimate_tax_savings`, inspect the existing host registration and confirm it launches the approved pinned `setsuzei@0.6.1` process locally over stdio. A tool name, a version in the result, or a connector label does not prove transport. If you cannot verify both local stdio and the pin before the call, use the approved local CLI. This skill does not register or configure a server.
- If the user declines, or the download fails, say that the estimate cannot be computed. Do not substitute figures from memory. The browser version (https://ozko00.github.io/setsuzei/) needs no install.

### 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:

```bash
echo '{"businessRevenue":8000000,"businessExpenses":1500000,"businessIncomeType":"business","blueReturn":"65","socialInsurance":900000,"idecoPaid":276000,"furusatoPaid":30000}' \
  | npx --yes setsuzei@0.6.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. Adding `--filing` without `--json` prints the return-field table in human-readable form (in Japanese).

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 |
| Medical expenses: the method chosen (`normal` / `selfMedication` / `none`), the deduction and total tax under each, and the tax saved | `deductionDetails.medical.method` / `.normal` / `.selfMedication` / `.saving.total` |
| Life-insurance premium deduction for income tax and for resident tax (per category and total), the tax saved, and whether the under-23 rule was used | `deductionDetails.lifeInsurance.incomeTax` / `.residentTax` / `.saving.total` / `.under23Rule` |
| Which return field gets which amount: field number `field`, printed name `label`, `amount`, explanation `note` | `filing.entries[]` (`sheet`: `first` = form 1, `second` = form 2, `resident` = the resident-tax section of form 2, `blue` = the blue-return financial statement) |
| Whether the field numbers come from a draft form, and the cautions on the field table | `filing.draft` / `filing.notes` |
| Input-dependent cautions | `warnings` |

### 4. Verify the result and report

- Quote amounts only from the CLI output. Do not add, prorate, or round them yourself; use `measures.combined.saving.total` for the combined total, because the per-measure savings do not add up.
- Report the current tax, then each measure as "pay this much more, tax falls by this much", including every item in that measure's `notes`. Never state a tax saving without the payment next to it (`additional`, `remaining`, or `totalPayment`).
- Do not recommend contributing more than `additional`; beyond it the tax no longer falls (`noEffectBeyond`).
- The combined total (`measures.combined`) does not include an iDeCo increase unless `idecoAdditional` was given. Present `measures.ideco` and `measures.combinedWithIdeco` as conditional on the user's iDeCo provider confirming that the increase can still count for this year; do not speak as if it will.
- Furusato nozei lowers tax by about the amount donated, so it does not leave the user with more money; the benefit is the return gifts, less the 2,000-yen own cost. When giving the combined saving, state the furusato nozei part (`savingFromFurusato`) separately.
- Say that iDeCo money cannot be withdrawn before age 60 in principle, carries account fees, and is taxed when received; that mutual aid payouts are taxed when received and voluntary cancellation before 240 months of contributions returns less than was paid; and that raising either lowers the furusato nozei limit (`measures.furusato.limitAfterOtherMeasures`).
- For medical expenses, report the method in `deductionDetails.medical.method` with the deduction and the tax saved, and pass on its `notes` (the two regimes cannot be combined, and the choice cannot be changed after filing). For life-insurance premiums, report the income-tax and resident-tax deductions separately; they differ.
- When asked where to write an amount, quote `field`, `label`, and `amount` from `filing.entries` as they are. Do not give field numbers from memory. Say that the numbering follows the National Tax Agency's draft form for tax year 2026 while `filing.draft` is `true`, and pass on `filing.notes`. Withholding tax and prepayments are not computed (the `amount` of field ㊾ is `null`), so do not present field ㊿ as the amount to pay or to be refunded when the user has either.
- Pass on every item in `warnings`, including the ones about the resident-tax exemption and about entering dependents under 16.
- End every answer by saying the figures are estimates and do not replace a tax accountant, the tax office, or the municipality.

## Examples

```text
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 outputs of setsuzei 0.6.1 for this input.
```

```text
User request: 医療費控除とセルフメディケーション税制はどちらが得? 生命保険料控除はいくらで、申告書のどこに書く? 上と同じ条件で、医療費30万(保険で5万補てん)、対象の市販薬4万、生命保険料(新契約)8万、介護医療保険料5万。
Inputs: {"businessRevenue":8000000,"businessExpenses":1500000,"businessIncomeType":"business","blueReturn":"65","socialInsurance":900000,"idecoPaid":276000,"furusatoPaid":30000,"medicalExpenses":300000,"medicalReimbursed":50000,"selfMedicationExpenses":40000,"lifeInsuranceNew":80000,"medicalCareInsurance":50000}
Expected result: current tax 713,900 yen (income tax 329,800 + resident tax 384,100). Medical: method `normal`, deduction 150,000 yen, tax saved 45,700 yen; the self-medication regime would deduct 28,000 yen and leave tax 37,100 yen higher. Life insurance: deduction 72,500 yen for income tax and 54,500 yen for resident tax, tax saved 20,400 yen. Furusato nozei limit 117,000 yen with 87,000 remaining. Return fields, form 1: ⑮ 生命保険料 72,500; ㉘ 医療費 150,000; ㉙ 寄附金 28,000; ㉛ 課税される所得金額 3,753,000; ㊿ 申告納税額 329,800 (before any withholding tax or prepayment). These are the outputs of setsuzei 0.6.1 for this input.
```

## Limitations

- Tax year 2026 only. Rules change yearly; the pinned version does not know later law.
- Estimates only. It does not compute National Health Insurance premiums in full, enterprise tax, consumption tax, separately taxed income, housing-loan credits, or pension income. The earthquake insurance deduction is not computed; its amount can only be passed in through `otherDeductions`.
- Return fields: the field numbers and names follow the National Tax Agency's draft of the tax year 2026 return (`filing.draft` is `true`). Withholding tax, prepayments, and tax credits are not included, so the output does not give the final amount to pay or to be refunded for a user who has any of them.
- Resident tax: the exemption threshold for the income-based part is applied (it depends on the spouse and dependents entered, including those under 16). The exemption of the per-capita part is not computed, because its threshold differs by municipality; the CLI only warns when it may apply.
- The iDeCo limit is assumed from employment type (self-employed, or employee without a corporate pension) unless `idecoAnnualLimit` is given.
- It does not judge eligibility: whether the user can join mutual aid, meets a blue-return requirement, or may claim a dependent.
- The CLI's messages and notes are in Japanese.
- If the CLI cannot be run, the skill produces no numbers.

## Safety and side effects

- Writes: one package (`setsuzei@0.6.1`, under 1 MB, no dependencies) in the npm cache. Nothing else is modified.
- Network: the npm registry during the one-time download, only after the user approves. No user data is sent anywhere; the calculation reads standard input and writes standard output.
- The user's income figures stay in the conversation and the local process. Do not write them to files.
- No accounts, credentials, or paid services.

## Sources and related skills

- CLI source, tests, and the list of what is and is not calculated: https://github.com/ozko00/setsuzei
- Per-number primary sources: https://github.com/ozko00/setsuzei/blob/v0.6.1/src/data/2026.ts
- Browser version of the same calculation (no install): https://ozko00.github.io/setsuzei/
- Related in this catalog: `tax-register` and `expense-accounting` build record-keeping templates; they do not estimate personal tax.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.