moneyutils-in

INR money utilities for Indian apps

A lightweight, TypeScript-first library for formatting, GST, discounts, fees, commissions, and order totals — built for e-commerce, booking, and payment workflows.

11

Exported functions

0

Runtime dependencies

100%

TypeScript typed

Features

Everything you need for INR money math

From display formatting to full checkout totals — one small package, no runtime dependencies.

INR formatting

Indian lakh-style grouping with configurable decimals and optional ₹ symbol.

Rupee ↔ paise

Convert between rupees and paise for payment gateways and ledger storage.

GST calculations

Add or remove GST with CGST/SGST split for intra-state or IGST for inter-state.

Discounts

Percentage and fixed-amount discounts with original, saved, and final amounts.

Fees & commissions

Platform fees and marketplace commissions with net payout breakdowns.

Order totals

Cart subtotal, discount, fees, tax, and grand total in one call.

Built for

E-commerce checkout flowsBooking and ticketing platformsMarketplace seller payoutsInvoice and receipt generationPayment gateway integrations

Install

Install from npm

bash
npm install moneyutils-in

Quick start

typescript
import {
  formatINR,
  addGST,
  calculatePercentageDiscount,
  calculateCommission,
} from "moneyutils-in";

formatINR(125000);
// ₹1,25,000.00

addGST(1000, 18);
// { taxableAmount: 1000, totalTax: 180, totalAmount: 1180, ... }

calculatePercentageDiscount(2000, 15);
// { originalAmount: 2000, discountAmount: 300, finalAmount: 1700, ... }

calculateCommission(5000, 12);
// { commissionAmount: 600, netAmount: 4400, ... }

Order calculation example

typescript
import { calculateOrderTotal } from "moneyutils-in";

const total = calculateOrderTotal({
  items: [
    { price: 999, quantity: 2 },
    { price: 2499, quantity: 1 },
  ],
  discount: { type: "percentage", value: 10 },
  fees: [{ name: "Delivery", amount: 50 }],
  tax: { rate: 18 },
});

console.log(total.grandTotal);
// 4834.81

Disclaimer: GST and tax utilities perform calculations based on the values provided by the developer. They do not determine the legally applicable tax rate or tax treatment for a transaction.

Ready to simplify INR money math?

Browse the full API reference or try every function in the live playground.

Money Utils IN

TypeScript-first money utilities for INR formatting, GST, discounts, fees, commissions, and order totals for Indian e-commerce and booking apps.

© 2026 Money Utils IN