尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证Beginner-friendly financial calculators — fincalculator.co
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 README ↗A fast, mobile-first suite of accurate financial calculators — from a first budget to early retirement. Every calculator updates live as you type, explains its result in plain English, draws a chart, shows a full schedule where relevant, and can be shared by URL or exported to CSV.
No accounts, no backend, no tracking: it's a static site and everything runs in the browser.
| Level | Calculators |
|---|---|
| Basics | Budget & Emergency Fund · Simple Interest · Inflation · Interest Rates Explained (APR ↔ APY, Rule of 72) |
| Building Wealth | Compound Interest · Savings Goal · Investment Return (CAGR) |
| Debt & Borrowing | Loan Payment · Mortgage · Debt Payoff Plan (Avalanche vs. Snowball) |
| Long Game | Retirement (with FIRE number) |
Built for people learning financial literacy: every calculator opens with the plain question it answers, a 3-step "how to use" box, plain-English tooltips and hints on where to find each number.
Beginner's Guide (/guide/): how the calculators work, which one to use, what interest rates mean (with typical ranges), and a plain-English glossary (shared with the tooltips via lib/glossary.ts).
Requires Node 20+.
npm install
npm run dev # http://localhost:3000
| Command | What it does |
|---|---|
npm run dev | Dev server with hot reload |
npm run build | Static export to out/ (deploy anywhere; Vercel works out of the box) |
npm start | Serve the built out/ folder locally on port 3000 |
npm test | Unit tests (Vitest): test vectors, property tests, formatting, URL state, CSV |
npm run test:e2e | Playwright: one smoke test per calculator, accessibility (axe) in light and dark mode, and input fuzzing — at desktop and 375 px mobile widths. Builds the site first. |
npm run lint | ESLint (Next.js rules, no-explicit-any as an error, zero warnings allowed) |
npm run typecheck | TypeScript strict check |
The first time you run the e2e tests, install a browser: npx playwright install chromium.
npm run dev builds into .next-dev and production builds use .next, so you can run the tests or npm run build while the dev server is running. If the dev server ever shows a Cannot find module './123.js' error, stop it, delete .next-dev, and start it again.
The live site is https://fincalculator.co, hosted on GitHub Pages.
main runs .github/workflows/deploy.yml: lint, typecheck and unit tests, then npm run build and a deploy of the out/ folder. A failing check blocks the deploy.npm run test:e2e) run on pull requests via .github/workflows/e2e.yml, or on demand from the Actions tab.public/CNAME and in the repo's Settings → Pages.app/ routes: hub, /guide and /calculators/[slug]
components/
ui/ Input, Select, Toggle, Slider, Card, Tabs, Tooltip, form-bound fields
calculator/ CalculatorShell, panels, ResultSummary, ScheduleTable, Share/Copy/Export, Explainer, useCalculator
calculators/ one component per calculator + registry.ts
charts/ GrowthChart, AmortizationChart, PayoffChart, BreakdownDonut
lib/
finance/ pure math (no React) — one file per domain
format.ts currency, percent, duration formatters (Intl.NumberFormat)
url-state.ts inputs ⇄ query string
csv.ts schedule → CSV (Excel/Sheets-friendly)
schema.ts zod helpers that turn field text into validated numbers
calculators.ts calculator registry (titles, plain-language questions, how-to steps, groups, hub order)
glossary.ts plain-English definitions used by ⓘ tooltips and the guide's glossary
site.ts site name, tagline and disclaimer
content/explainers/ one Markdown "What this means" explainer per calculator
tests/unit, tests/e2e Vitest and Playwright suites
5 = 5%); they become decimals at the schema boundary. Everything in lib/finance takes decimals.NaN, Infinity or -0.:root is light mode and .dark is dark mode. Values are space-separated RGB channels (e.g. --brand: 4 120 87;) so Tailwind opacity modifiers keep working. --chart-1 … --chart-6 are the chart series colors.--font-sans / --font-display in the same file (they default to the system font stack, which keeps the site fast). To use a web font, load it with next/font in app/layout.tsx and point the variable at it.bg-brand or text-ink-muted) live in tailwind.config.ts.After changing colors, run npm run test:e2e — the axe accessibility suite checks WCAG AA contrast in both themes.
See CONTRIBUTING.md.
All calculators are verified against the published test vectors (see tests/unit/finance/vectors.test.ts) and property tests such as "amortization principal always sums to the loan" and "Avalanche never pays more interest than Snowball."
One documented nuance: a $200,000, 6%, 30-year loan's cent-rounded schedule ($1,199.10 × 359 plus a $1,200.14 final payment) totals $231,677.04 in interest. The textbook figure of about $231,676 comes from the unrounded payment ($1,199.1010…) and is also asserted in the tests.
Results are educational estimates, not financial advice.