Versions in this module Expand all Collapse all v1 v1.1.0 Aug 24, 2026 Changes in this version + type SWPInput struct + AnnualIncreasePct float64 + AnnualRatePct float64 + Corpus float64 + MonthlyWithdrawal float64 + Years int + type SWPResult struct + DepletedAtMonth int + FinalBalance float64 + Gains float64 + TotalWithdrawn float64 + func SWP(in SWPInput) (SWPResult, error) v1.0.0 Aug 24, 2026 Changes in this version + const DefaultGSTInterestRate + const MaxMonths + const MaxYears + func AnnualContributionMaturity(yearlyAmount, annualRatePct float64, years int) (float64, error) + func CAGR(initial, final, years float64) float64 + func EMI(principal, annualRate float64, months int) float64 + func GSTInterest(cashTaxPaid float64, days int, annualRatePct float64) float64 + func Lumpsum(principal, annualRate, years float64) float64 + func SIPFutureValue(monthly, annualRate float64, months int) float64 + func TotalInterest(principal, annualRate float64, months int) float64 + type AmortRow struct + Closing float64 + Interest float64 + Month int + Opening float64 + Principal float64 + func Amortisation(principal, annualRate float64, months int) ([]AmortRow, error) + type ErrTenure struct + Got int + Limit int + Unit string + func (e *ErrTenure) Error() string + type GST struct + Base float64 + Tax float64 + Total float64 + func GSTAdd(amount, ratePct float64) GST + func GSTRemove(grossAmount, ratePct float64) GST + type Gratuity struct + Amount float64 + Capped bool + Ceiling float64 + Eligible bool + FormulaValue float64 + func ComputeGratuity(lastSalary, years float64, opts GratuityOptions) Gratuity + type GratuityOptions struct + Ceiling float64 + MinYears float64 + type PrepaymentInput struct + AnnualRate float64 + LumpSum float64 + LumpSumAtMonth int + MonthlyExtra float64 + Months int + Principal float64 + type PrepaymentResult struct + InterestSaved float64 + MonthsSaved int + NewInterest float64 + NewMonths int + func Prepayment(in PrepaymentInput) (PrepaymentResult, error) + type Slab struct + Rate float64 + Upto float64 + func DefaultSlabs() []Slab + type StepUpResult struct + FutureValue float64 + Gain float64 + Invested float64 + func StepUpSIP(monthly, annualRate float64, years int, stepUpPct float64) (StepUpResult, error) + type Tax struct + Cess float64 + Tax float64 + Total float64 + func IncomeTaxNewRegime(taxableIncome float64, opts TaxOptions) Tax + type TaxOptions struct + Cess float64 + RebateUpto float64 + Slabs []Slab