My First Finance Web App

Dividend Re-Investment Calculator App

Featured image


đź’ˇ Building a Dividend Growth Calculator with Streamlit and Jekyll

đź”§ Project Summary

In this project, we built a web-based stock investment calculator that shows how a stock investment grows over time, factoring in both price appreciation and reinvested dividends. This tool is ideal for long-term investors who want to visualize the true total return of a stock—not just its price change.

🎯 What the App Does

  • Accepts a stock symbol (e.g., AAPL or MSFT) and an initial investment amount
  • Lets users select a time period with a slider (e.g., 5, 10, or 20 years)
  • Fetches historical price and dividend data using yfinance
  • Calculates total portfolio value assuming automatic dividend reinvestment
  • Displays:
    • Final portfolio value
    • Total return percentage
    • A line chart showing growth over time

The result is a visual, interactive demonstration of how powerful compounding dividends can be for long-term investors.

🛠️ How We Built It

  1. Built the app locally using Streamlit and VS Code
  2. Used yfinance to pull historical price and dividend data
  3. Wrote Python logic to simulate dividend reinvestment over time
  4. Created an interactive interface using Streamlit (text input, sliders, charts)
  5. Deployed the app for free on Streamlit Cloud
  6. Created a GitHub repository to host the code and requirements
  7. Linked the app from a personal Jekyll website using a button