Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

parthkhannax/ba2plus-calculator

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
4 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿงฎ BA II Plus โ€” Web Calculator

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.

Live Demo License: MIT No Dependencies Mobile Ready


โœจ Overview

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


๐ŸŽฏ Features

Financial Functions

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

Calculator Functions

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

UX & Design

  • 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

๐Ÿ–ฅ๏ธ Screenshots

Desktop

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ 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]     [.]   [+/โˆ’]               โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Mobile

Single-column layout fills the phone screen with finger-sized tap targets.


๐Ÿš€ Quick Start

Run locally (instant)

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

Deploy your own copy to GitHub Pages

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

๐Ÿ“– How to Use

TVM Worksheet

  1. Press any TVM key (N, I/Y, PV, PMT, FV) โ€” the worksheet opens
  2. Fill in the 4 known values
  3. Press the CPT [variable] button for the unknown
  4. 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

CF / NPV / IRR Worksheet

  1. Press CF โ€” the cash flow worksheet opens
  2. Enter CF0 (initial outflow, usually negative)
  3. Press + Add CF Period for each subsequent period
  4. Set frequency (ร—) for repeated cash flows
  5. Enter I/Y % discount rate, then press CPT NPV
  6. 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%

STO / RCL (Memory Registers)

  1. Press STO โ€” a register grid (0โ€“9) appears showing current stored values
  2. Tap a register number to store the current display value
  3. Press RCL and tap a register to recall it to the display

2ND Key

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)

โŒจ๏ธ Keyboard Shortcuts

Key Action
0โ€“9 Digit input
+ - * / Arithmetic operators
. Decimal point
( ) Parentheses
Enter or = Evaluate expression
Backspace Delete last character
Escape or c Clear display

๐Ÿ“ Project Structure

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.


๐Ÿ”ข Math & Algorithms

TVM Solver

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

NPV

Standard discounted cash flow with support for frequency-grouped cash flows:

NPV = CF0 + ฮฃ [ CFt / (1+r)^t ]

IRR

Solved via bisection on NPV(r) = 0 with bracket expansion for convergence across any sign pattern.


๐Ÿค Contributing

Pull requests are welcome. For major changes, open an issue first.

  1. Fork the repo
  2. Create a branch: git checkout -b feature/your-feature
  3. Commit your changes: git commit -m 'Add: your feature'
  4. 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

๐Ÿ“„ License

MIT โ€” free to use, modify, and distribute.


Made with โ˜• and financial nerdery.
Star โญ the repo if it saved you from carrying a physical calculator.

About

๐Ÿงฎ BA II Plus financial calculator โ€” TVM, NPV, IRR, STO/RCL, CF worksheet. Zero dependencies. GitHub Pages ready.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.