貯蓄目標計算機
目標金額を達成するために毎月いくら貯蓄が必要かを計算します。
貯蓄目標計算機は、特定の日付までに財務目標を達成するために毎月いくら貯蓄する必要があるかを正確に把握するのに役立ちます。休暇、住宅の頭金、緊急資金、または大きな購入のために貯蓄する場合でも、このツールは目標を具体的で実行可能な月額貯蓄額に変換します。
目標額、現在の貯蓄額、貯蓄口座の年間リターン率、目標日を入力すると、計算機は必要な月額拠出額を教えてくれ、最終残高のうち拠出金と獲得利息がいくらかを示します。
逆算することもできます:毎月貯蓄できる金額を入力して、目標達成にどれくらいかかるかを確認してください。タイムラインを見ることで抽象的な目標が具体的になり、目標額、月額貯蓄額、または目標日を調整するかどうかを決めるのに役立ちます。
よくある質問
コード実装
def monthly_savings_needed(
goal: float,
current_savings: float,
months: int,
annual_rate: float = 0
) -> float:
"""Calculate monthly deposit needed to reach a savings goal."""
if annual_rate == 0:
return (goal - current_savings) / months
r = annual_rate / 100 / 12 # monthly rate
fv_current = current_savings * (1 + r) ** months
remaining = goal - fv_current
if remaining <= 0:
return 0
pmt = remaining / (((1 + r) ** months - 1) / r)
return pmt
# Example: save $10,000 in 24 months with 4% annual interest
monthly = monthly_savings_needed(
goal=10000,
current_savings=1000,
months=24,
annual_rate=4
)
print(f"Monthly deposit needed: ${monthly:.2f}")
# Show total contributions vs interest earned
total_contributions = monthly * 24 + 1000
print(f"Total contributions: ${total_contributions:.2f}")
print(f"Interest earned: ${10000 - total_contributions:.2f}")Comments & Feedback
Comments are powered by Giscus. Sign in with GitHub to leave a comment.