How do you format negative currency amounts with parentheses for accounting?

Use the currencySign option to display negative currency values in accounting notation

Introduction

Financial statements, accounting reports, and balance sheets display negative currency amounts in parentheses rather than with minus signs. A loss of five hundred dollars appears as ($500.00) instead of -$500.00. This convention makes negative amounts more visually distinct, reduces the risk of overlooking losses, and follows established accounting standards.

JavaScript's Intl.NumberFormat API provides the currencySign option to format negative currency amounts in this accounting notation. When you set currencySign to "accounting", negative values automatically display in parentheses according to locale conventions.

Why accounting notation uses parentheses

The practice of wrapping negative amounts in parentheses originated before computers became common in accounting. A minus sign printed on paper could be small, faint, or easily missed when scanning columns of numbers. Parentheses create a clear visual boundary around negative values, making them immediately recognizable.

Parentheses also prevent confusion with hyphens or dashes that appear in other contexts. In dense financial tables with many rows and columns, parentheses stand out more than a single minus sign character. This visual distinction helps prevent errors when reading, transcribing, or analyzing financial data.

The convention became standard practice in accounting and remains widely used today. Most accounting software, financial reports, and balance sheets display negative amounts in parentheses. Users familiar with financial documents expect this format and find it easier to read than minus signs.

Using currencySign accounting format

Pass the currencySign option with the value "accounting" when creating an Intl.NumberFormat instance for currency formatting. This tells the formatter to use accounting notation for negative amounts.

const formatter = new Intl.NumberFormat('en-US', {
  style: 'currency',
  currency: 'USD',
  currencySign: 'accounting'
});

console.log(formatter.format(-1234.56));
// Output: "($1,234.56)"

console.log(formatter.format(1234.56));
// Output: "$1,234.56"

The negative amount displays wrapped in parentheses without a minus sign. Positive amounts display normally without parentheses. The formatter applies the appropriate accounting notation automatically based on whether the value is positive or negative.

The currencySign option only affects currency formatting. You must set style: 'currency' and provide a currency code for the option to take effect.

Comparing standard and accounting formats

The default currency format uses a minus sign for negative values. This standard format works well for general purposes, while accounting format follows financial reporting conventions.

const standard = new Intl.NumberFormat('en-US', {
  style: 'currency',
  currency: 'USD',
  currencySign: 'standard'
});

const accounting = new Intl.NumberFormat('en-US', {
  style: 'currency',
  currency: 'USD',
  currencySign: 'accounting'
});

console.log(standard.format(-500));
// Output: "-$500.00"

console.log(accounting.format(-500));
// Output: "($500.00)"

The standard format places a minus sign before the currency symbol. The accounting format wraps the entire amount, including the currency symbol, in parentheses. Both formats produce the same output for positive values.

If you omit the currencySign option, the formatter defaults to "standard" behavior.

const formatter = new Intl.NumberFormat('en-US', {
  style: 'currency',
  currency: 'USD'
});

console.log(formatter.format(-500));
// Output: "-$500.00"

How accounting notation varies by locale

Different locales place the currency symbol and parentheses in different positions according to local conventions. The Intl.NumberFormat API handles these variations automatically.

const currencies = [
  { locale: 'en-US', currency: 'USD' },
  { locale: 'de-DE', currency: 'EUR' },
  { locale: 'fr-FR', currency: 'EUR' },
  { locale: 'ja-JP', currency: 'JPY' }
];

currencies.forEach(({ locale, currency }) => {
  const formatter = new Intl.NumberFormat(locale, {
    style: 'currency',
    currency: currency,
    currencySign: 'accounting'
  });

  console.log(`${locale}: ${formatter.format(-1234.56)}`);
});

// Output:
// en-US: ($1,234.56)
// de-DE: (-1.234,56 €)
// fr-FR: (1 234,56 €)
// ja-JP: (¥-1,235)

Each locale formats the negative amount according to its conventions for currency symbol placement, decimal separators, thousands separators, and parenthesis usage. You do not need to know these conventions or implement them manually. The API applies the correct format based on the locale identifier.

Some locales place the minus sign inside the parentheses near the number. Others place it near the currency symbol. The formatter handles these details based on locale-specific rules.

Combining accounting notation with sign display options

The currencySign option works together with the signDisplay option to control how signs appear in currency formatting. This combination gives you fine control over positive and negative amount display.

const always = new Intl.NumberFormat('en-US', {
  style: 'currency',
  currency: 'USD',
  currencySign: 'accounting',
  signDisplay: 'always'
});

console.log(always.format(500));
// Output: "+$500.00"

console.log(always.format(-500));
// Output: "($500.00)"

With signDisplay: 'always', positive amounts display with a plus sign while negative amounts still use parentheses. This makes both gains and losses explicit.

const never = new Intl.NumberFormat('en-US', {
  style: 'currency',
  currency: 'USD',
  currencySign: 'accounting',
  signDisplay: 'never'
});

console.log(never.format(500));
// Output: "$500.00"

console.log(never.format(-500));
// Output: "$500.00"

With signDisplay: 'never', both positive and negative amounts display identically without signs or parentheses. This shows only the magnitude regardless of whether the value is positive or negative.

const exceptZero = new Intl.NumberFormat('en-US', {
  style: 'currency',
  currency: 'USD',
  currencySign: 'accounting',
  signDisplay: 'exceptZero'
});

console.log(exceptZero.format(500));
// Output: "+$500.00"

console.log(exceptZero.format(-500));
// Output: "($500.00)"

console.log(exceptZero.format(0));
// Output: "$0.00"

With signDisplay: 'exceptZero', positive amounts show a plus sign, negative amounts use parentheses, and zero displays without any sign. This format works well for profit and loss statements where you want to emphasize changes while keeping zero neutral.

When to use accounting format

Use accounting format when displaying financial data in contexts where users expect accounting conventions. This includes financial statements, balance sheets, income statements, profit and loss reports, and accounting software interfaces.

Accounting format makes negative amounts more prominent than standard format. The parentheses create a visual boundary that draws attention to losses, debts, or negative balances. This helps users quickly identify problem areas when scanning financial data.

const accountingFormatter = new Intl.NumberFormat('en-US', {
  style: 'currency',
  currency: 'USD',
  currencySign: 'accounting'
});

const accounts = [
  { name: 'Cash', balance: 15000 },
  { name: 'Accounts Receivable', balance: -3500 },
  { name: 'Inventory', balance: 12000 },
  { name: 'Accounts Payable', balance: -8000 }
];

accounts.forEach(account => {
  const formatted = accountingFormatter.format(account.balance);
  console.log(`${account.name}: ${formatted}`);
});

// Output:
// Cash: $15,000.00
// Accounts Receivable: ($3,500.00)
// Inventory: $12,000.00
// Accounts Payable: ($8,000.00)

The parentheses make the negative balances stand out, helping users identify accounts with negative values at a glance.

Use standard format for general e-commerce, consumer-facing interfaces, or contexts where accounting conventions do not apply. Most users outside of accounting and finance are less familiar with parenthetical notation and expect to see minus signs for negative amounts.

const standardFormatter = new Intl.NumberFormat('en-US', {
  style: 'currency',
  currency: 'USD'
});

// For a shopping cart or refund:
console.log(standardFormatter.format(-25.50));
// Output: "-$25.50"

Choose accounting format when your audience expects financial reporting conventions. Choose standard format when your audience expects consumer-oriented displays. Match the format to your users' expectations and the context where the numbers appear.

Browser support for accounting format

The currencySign: "accounting" option is supported in all modern browsers. Chrome, Edge, Firefox, Safari, and their mobile counterparts all support this feature in versions released since 2019.

If you need to support older browsers, test the feature and provide a fallback.

function formatCurrency(amount) {
  try {
    const formatter = new Intl.NumberFormat('en-US', {
      style: 'currency',
      currency: 'USD',
      currencySign: 'accounting'
    });
    return formatter.format(amount);
  } catch (error) {
    // Fallback for browsers without accounting support
    const formatter = new Intl.NumberFormat('en-US', {
      style: 'currency',
      currency: 'USD'
    });
    return formatter.format(amount);
  }
}

This fallback returns standard currency format if accounting format is unavailable. In practice, accounting format support is widespread enough that this fallback is rarely necessary for applications supporting modern browsers only.