DEV Community

Arhan Khan
Arhan Khan

Posted on

Build a Personal Budget Planner App with JavaScript

A personal budget planner is one of the most useful apps a beginner can build, because it solves a real problem with simple code. The user enters their monthly income, splits it into categories like rent, food, transport, and savings, and the app shows whether the plan adds up — with a visual breakdown of where every rupee goes. You will practice form handling, arithmetic, localStorage, and rendering a chart with plain HTML and CSS.

The core idea is a 50/30/20 starting point: 50% for needs, 30% for wants, 20% for savings. Your app lets the user adjust those numbers, then warns them when a category goes over its target. That single rule turns a blank form into genuinely useful advice.

const state = {
  income: 50000,
  categories: [
    { name: 'Rent', amount: 15000, type: 'need' },
    { name: 'Food', amount: 8000, type: 'need' },
    { name: 'Transport', amount: 3000, type: 'need' },
    { name: 'Fun', amount: 5000, type: 'want' },
    { name: 'Savings', amount: 10000, type: 'save' },
  ],
}

function totals(categories) {
  return categories.reduce(
    (sum, c) => {
      sum[c.type] += c.amount
      sum.all += c.amount
      return sum
    },
    { need: 0, want: 0, save: 0, all: 0 },
  )
}

function isOverBudget(income, total) {
  return total > income
}
Enter fullscreen mode Exit fullscreen mode

Build the interface with an income input, a list of category rows the user can add, edit, and delete, and a summary bar that shows needs, wants, and savings as percentages of income. Save the plan to localStorage so it survives a reload, and add a warning message when the total crosses the income. If you want to go deeper into money habits after building it, the best personal finance books for Indians are a good next read — they cover the same ideas your app teaches, in much more detail.

This project teaches you to keep state in one object, to derive every number on screen from that state, and to persist data without a backend. Once the basic version works, add a monthly comparison view, an export-to-CSV button, or a savings-goal tracker that shows how many months until a target is reached.

The limits are honest ones. A budget planner is only as good as the numbers the user enters — it cannot track real spending unless the user logs it. Keep the app focused on planning, and say clearly that it is a planning tool, not a bank account.

Ship it this weekend: one income input, a few category rows, and a summary bar. It is a small project that teaches state management the way real apps do it.

Top comments (0)