shubham07
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
index.ts
https://Scoder--0cadbc043eb411f089e476b3cceeab13.web.val.run
A comprehensive web-based compound interest calculator that supports over 50 currencies including major fiat currencies and cryptocurrencies.
- Multi-Currency Support: Calculate in 50+ currencies including USD, EUR, GBP, JPY, CNY, INR, BTC, ETH, and many more
- Calculate compound interest with various parameters
- Support for different compounding frequencies (annually, semi-annually, quarterly, monthly, daily)
- Visual representation of growth over time
- Additional contributions support
- Real-time calculations as you type
- Proper currency formatting with locale-specific decimal places
- Cryptocurrency support (Bitcoin, Ethereum)
- Americas: USD, CAD, BRL, MXN, CLP, COP, PEN, ARS, UYU
- Europe: EUR, GBP, CHF, NOK, SEK, DKK, PLN, CZK, HUF, BGN, RON, HRK, ISK
- Asia-Pacific: JPY, CNY, INR, KRW, SGD, HKD, AUD, NZD, THB, MYR, IDR, PHP, VND
- Middle East & Africa: AED, SAR, EGP, ILS, TRY, ZAR, NGN, GHS, KES, MAD, TND
- South Asia: LKR, PKR, BDT, NPR, MMK, KHR, LAK
- Cryptocurrencies: BTC (Bitcoin), ETH (Ethereum)
├── backend/
│ └── index.ts # Main HTTP server (Hono)
├── frontend/
│ ├── index.html # Main HTML template
│ ├── index.tsx # React frontend entry point
│ └── style.css # Custom styles
├── shared/
│ └── types.ts # Shared TypeScript types
└── README.md
The calculator accepts the following inputs:
- Currency selection (50+ supported currencies)
- Principal amount (initial investment)
- Annual interest rate (%)
- Time period (years)
- Compounding frequency
- Additional monthly contributions (optional)
All amounts are displayed in the selected currency with proper formatting.
The compound interest formula used:
A = P(1 + r/n)^(nt) + PMT × [((1 + r/n)^(nt) - 1) / (r/n)]
Where:
- A = Final amount
- P = Principal amount
- r = Annual interest rate (decimal)
- n = Number of times interest compounds per year
- t = Time in years
- PMT = Additional monthly payment