Dividend Calculator
A dividend calculator helps you project income from dividend-paying stocks and ETFs. Dividends provide passive income and, when reinvested, significantly boost long-term wealth through compounding.
Understanding Dividend Yield
Dividend yield = Annual Dividends ÷ Stock Price × 100
| Portfolio Value | 2% Yield | 3% Yield | 4% Yield | 5% Yield | $50,000$1,000$1,500$2,000$2,500 $100,000$2,000$3,000$4,000$5,000 $250,000$5,000$7,500$10,000$12,500 $500,000$10,000$15,000$20,000$25,000 | $1,000,000 | $20,000 | $30,000 | $40,000 | $50,000 |
Dividend Calculator Implementation
``javascript
function calculateDividends(portfolioValue, yieldPercent, shares = null, dividendPerShare = null) {
if (shares && dividendPerShare) {
const annual = shares * dividendPerShare * 4; // quarterly dividends
return {
annual,
monthly: annual / 12,
quarterly: annual / 4,
yield: (annual / portfolioValue) * 100
};
}
const annual = portfolioValue * (yieldPercent / 100);
return {
annual,
monthly: annual / 12,
quarterly: annual / 4,
yield: yieldPercent
};
}
// $100,000 portfolio at 4% yield
console.log(calculateDividends(100000, 4));
// { annual: 4000, monthly: 333.33, quarterly: 1000, yield: 4 }
``
Income to Replace Salary
To replace income with dividends (at 4% yield):
- $30,000/year needs $750,000 invested
- $50,000/year needs $1,250,000 invested
- $100,000/year needs $2,500,000 invested