A pixel-perfect, fully functional Texas Instruments BA II Plus financial calculator built with zero dependencies.
Works in every browser. Deploys to GitHub Pages in one click.
This is a complete browser-based recreation of the Texas Instruments BA II Plus financial calculator โ the industry-standard tool used by CFA, CPA, and finance professionals worldwide.
No installs. No build step. No frameworks. Pure HTML + CSS + JS.
Try it live โ parthkhannax.github.io/ba2plus-calculator
| Feature | Description |
|---|---|
| TVM Worksheet | Solve for any one of N, I/Y, PV, PMT, FV given the other four |
| Cash Flow (CF) | Enter up to unlimited cash flow periods with frequency multipliers |
| NPV | Net Present Value from CF worksheet at a given discount rate |
| IRR | Internal Rate of Return solved via bisection algorithm |
| STO / RCL | 10 memory registers (0โ9) with persistent values and quick-access overlay |
| Feature | Description |
|---|---|
| 2ND key | Activates gold secondary functions (eหฃ, ANS, QUIT, etc.) |
| Basic arithmetic | + โ ร รท with full parentheses support |
| Math functions | โx, xยฒ, 1/x, LN, eหฃ, yหฃ, % |
| Sign toggle | +/โ flips positive/negative instantly |
| Keyboard support | Full number row + operators + Enter/Backspace/Escape |
| Expression display | Shows running expression above the main result |
- Authentic dark charcoal body with olive-green LCD display
- Yellow 2ND labels on every key matching the real device
- Smooth key-press animations and active states
- Responsive layout โ scales from 320px mobile to widescreen desktop
- Zero-jank on iOS Safari, Android Chrome, and all desktop browsers
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โโโโโโโโโโโ LCD (olive green) โโโโโโโโโโโ โ
โ 0,3200 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ [CPT] [ENTER] [โ] [โ] [=] โ
โ [2ND] [CF] [NPV] [IRR] [โ] โ
โ [N] [I/Y] [PV] [PMT] [FV] โ
โ [%] [โx] [xยฒ] [1/x] [รท] โ
โ [INV] [(] [)] [yหฃ] [ร] โ
โ [LN] [7] [8] [9] [โ] โ
โ [STO] [4] [5] [6] [+] โ
โ [RCL] [1] [2] [3] [=] โ
โ [CE|C] [0] [.] [+/โ] โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Single-column layout fills the phone screen with finger-sized tap targets.
git clone https://github.com/parthkhannax/ba2plus-calculator.git
cd ba2plus-calculator
open index.html # macOS
# or just double-click index.html in any file manager# 1. Fork this repo on GitHub, then:
git clone https://github.com/YOUR_USERNAME/ba2plus-calculator.git
cd ba2plus-calculator
# 2. In your repo: Settings โ Pages โ Source = GitHub Actions
# 3. Push any change to trigger deployment:
git commit --allow-empty -m "Deploy"
git push origin main
# Your site will be live at:
# https://YOUR_USERNAME.github.io/ba2plus-calculator/- Press any TVM key (N, I/Y, PV, PMT, FV) โ the worksheet opens
- Fill in the 4 known values
- Press the CPT [variable] button for the unknown
- Result appears on the display and fills the field
Example โ Loan payment:
N = 360 (30-year mortgage = 360 monthly payments)
I/Y = 6 (6% annual rate)
PV = 300000 (loan amount)
FV = 0
โ CPT PMT = -1,798.65
- Press CF โ the cash flow worksheet opens
- Enter CF0 (initial outflow, usually negative)
- Press + Add CF Period for each subsequent period
- Set frequency (
ร) for repeated cash flows - Enter I/Y % discount rate, then press CPT NPV
- Or press CPT IRR to solve for the rate where NPV = 0
Example โ Project evaluation:
CF0 = -10000
CF1 = 3000 (ร 1)
CF2 = 4000 (ร 1)
CF3 = 5000 (ร 1)
I/Y = 10%
โ NPV = 823.02
โ IRR = 14.35%
- Press STO โ a register grid (0โ9) appears showing current stored values
- Tap a register number to store the current display value
- Press RCL and tap a register to recall it to the display
The 2ND key activates the gold secondary functions shown above each key:
2ND+ CPT โ QUIT (resets display to 0, closes all panels)2ND+ LN โ eหฃ (e raised to current value)2ND+ = โ ANS (recall last result)
| Key | Action |
|---|---|
0โ9 |
Digit input |
+ - * / |
Arithmetic operators |
. |
Decimal point |
( ) |
Parentheses |
Enter or = |
Evaluate expression |
Backspace |
Delete last character |
Escape or c |
Clear display |
ba2plus-calculator/
โโโ index.html # Calculator markup (semantic HTML5)
โโโ styles.css # Full layout + responsive design (500 lines)
โโโ script.js # Calculator engine + TVM/CF/NPV/IRR logic (600 lines)
โโโ .github/
โ โโโ workflows/
โ โโโ deploy.yml # GitHub Pages auto-deploy workflow
โโโ README.md
No build tools. No package.json. No node_modules.
The entire calculator is three files you can read start-to-finish in an afternoon.
Uses closed-form solutions for FV, PV, and PMT. Solves N and I/Y via bisection root-finding on the standard TVM equation:
PVยท(1+r)โฟ + PMTยท[(1+r)โฟ โ 1]/r + FV = 0
Standard discounted cash flow with support for frequency-grouped cash flows:
NPV = CF0 + ฮฃ [ CFt / (1+r)^t ]
Solved via bisection on NPV(r) = 0 with bracket expansion for convergence across any sign pattern.
Pull requests are welcome. For major changes, open an issue first.
- Fork the repo
- Create a branch:
git checkout -b feature/your-feature - Commit your changes:
git commit -m 'Add: your feature' - Push and open a PR
Ideas for contributions:
- Amortization schedule worksheet
- Bond pricing worksheet
- Depreciation worksheet (SL, SOYD, DB)
- Dark/light theme toggle
- History log panel
MIT โ free to use, modify, and distribute.
Made with โ and financial nerdery.
Star โญ the repo if it saved you from carrying a physical calculator.