Finance newsletters, investing blogs, and SaaS dashboards usually pick between two bad options: paste in a clunky third-party iframe that breaks on mobile, or spend Sunday night debugging WACC sensitivity edge cases. QuantCalc-JS is a pure ES module you drop straight into your own page. Edit any input below — all four calculators update in under 1ms with zero server calls.
No external script tags, no third-party branding watermark, no layout-shift scrollbars inside iframes, and zero npm bloat. Import the widget into React, Vue, Next.js, Webflow, WordPress, or plain HTML in two lines — or call the five pure math functions (calculateDcf, calculatePortfolioRisk, calculateKelly, calculateLoan, calculateIrr) directly inside your Node.js API or AI agent tool.
import { mountQuantWidget } from './quantWidget.mjs';
mountQuantWidget(document.getElementById('quant-mount'), { currency: '$', defaultTab: 'dcf' });
src/quantEngine.mjs — pure deterministic math module, zero dependencies, runs in browsers and Node.js 18+.src/quantWidget.mjs — responsive dark UI component with customizable currency ($, €, £) and default tab.test/quantEngine.test.mjs — 4/4 automated Node.js unit tests passing out of the box (node --test).demo/index.html + docs/index.html — working standalone demo and clean API reference.QuantCalc-JS does not pull live stock quotes, ticker fundamentals, or SEC filings from Yahoo Finance or any external market API. That is deliberate: external scrapers break every few months and force you to manage API keys and rate limits. You pass in the numbers (from user input or your own price feed), and QuantCalc-JS handles the math deterministically with zero server bills. Also note: calculateIrr solves periodic cashflow IRR for equal intervals (t0, t1, t2...), not irregular calendar-dated XIRR.