import React, { useState, useMemo } from "react"; import { PieChart, Pie, Cell, Tooltip, Legend, ResponsiveContainer } from "recharts"; // SIP Calculator - Single-file React component // Uses Tailwind CSS for styling. Default export is the component. export default function SIPCalculator() { const [monthly, setMonthly] = useState(10000); const [annualReturn, setAnnualReturn] = useState(12); const [years, setYears] = useState(10); const [logo, setLogo] = useState(null); const [investedColor, setInvestedColor] = useState("#2563EB"); // blue const [returnsColor, setReturnsColor] = useState("#10B981"); // green const [thirdColor, setThirdColor] = useState(""); // optional third color (not used in pie by default) const [useAnnuityDue, setUseAnnuityDue] = useState(false); // Format number in INR const fmtINR = (value) => { try { return new Intl.NumberFormat("en-IN", { style: "currency", currency: "INR", maximumFractionDigits: 0 }).format(value); } catch (e) { return `₹${Math.round(value).toLocaleString()}`; } }; // SIP future value calculation (end-of-period by default) // FV = P * [ ((1+r)^n - 1) / r ] * (1 + r)^0 for end-of-period // If annuity-due (contribution at beginning), multiply by (1 + r) const results = useMemo(() => { const P = Number(monthly) || 0; const annual = Number(annualReturn) || 0; const yrs = Number(years) || 0; const n = yrs * 12; const r = annual / 100 / 12; let fv = 0; if (r === 0) { fv = P * n; } else { fv = P * ((Math.pow(1 + r, n) - 1) / r); if (useAnnuityDue) fv *= (1 + r); } const invested = P * n; const totalReturns = Math.max(0, fv - invested); return { futureValue: fv, invested, totalReturns, months: n, }; }, [monthly, annualReturn, years, useAnnuityDue]); const pieData = [ { name: "Invested", value: Math.round(results.invested) }, { name: "Returns", value: Math.round(results.totalReturns) }, ]; // handle logo upload const onLogoChange = (e) => { const file = e.target.files?.[0]; if (!file) return; const url = URL.createObjectURL(file); setLogo({ file, url }); }; return (
{logo ? ( logo ) : (
Logo
)}

SIP Calculator (Monthly)

Enter monthly SIP (₹), expected annual return (%) and tenure (years).

setMonthly(e.target.value)} className="mt-1 block w-full rounded-lg border p-3" />
}
top of page

Products & Services

Covering All Your Needs

A woman analysing stocks

Stock Trading

Tailored To Your Needs

Using our Stock Trading services is a great way to stay on top of important financial decisions. Money saved due to high quality Stock Trading has real value that only accumulates over time. We’ve got extensive knowledge and experience in managing your goals for the best financial outcome. Get in touch with one of our professional experts and learn how you can get the most out of your finances.

Mutual Funds

Maximize Your Financial Gains

Mutual funds are a simple and effective investment option for building long-term wealth. They offer diversification, professional management, and flexibility across equity, debt, and hybrid categories. With small, regular investments, investors can benefit from compounding while reducing risk through a balanced portfolio. Ideal for both beginners and experienced investors, mutual funds help align financial goals with a disciplined approach.

Business Meeting
Family and Social Worker

Life & Health Insurance

Protect what matters most

As a investment advisor, we guide you to view insurance not just as protection, but also as a strategic part of your financial plan. Insurance provides a safety net against life’s uncertainties while also offering options that combine security with savings and wealth accumulation. Products like endowment plans and ULIPs allow you to protect your family and grow your money steadily over time. While returns may be moderate compared to market-linked options, they bring stability, tax advantages, and peace of mind. Our role is to help you integrate insurance into your overall investment strategy for balanced financial growth.

  • Facebook
  • Whatsapp
  • LinkedIn

©2021 by Fund Masters Investment Services

bottom of page