View Categories

Rounding Behavior

Last verified with: 10.8.6.0

Overview #

Rounding in LogiSense Billing is designed to balance accuracy, financial control, and predictable invoice outcomes.

The platform does not simply round every value at the first opportunity. Instead, it keeps amounts at a higher internal precision during calculation, then applies rounding at the appropriate stage for rated usage, taxes, invoice items, and invoice totals.

This is important because it helps reduce avoidable rounding drift while still producing invoice amounts that match the currency and financial expectations of the business.

The Core Model #

At a high level, LogiSense Billing follows this pattern:

  • calculate monetary values using higher internal precision,
  • store operational monetary values at up to 11 decimal places where applicable,
  • round usage-rated amounts according to rating configuration,
  • round invoice-facing monetary amounts according to the currency minor unit,
  • and carry forward small rounding differences during invoice and tax rounding so value is not lost.

What this means is:

  • the platform preserves accuracy during calculation,
  • but invoices still present amounts at the correct currency precision, such as 2 decimal places for many currencies,
  • and small fractions of a cent are not simply discarded.

Internal Precision: 11 Decimal Places #

One of the most important rounding behaviors in the system is the use of 11 decimal places of precision for internal monetary calculations.

This precision is used for monetary values such as:

  • invoice item amounts,
  • pre-discount amounts,
  • tax amounts,
  • base amounts,
  • and related internal billing values before final invoice rounding.

What this means is:

  • the system can calculate partial-period charges, discounts, taxes, and rated usage amounts with greater accuracy before invoice presentation rounding is applied,
  • and small fractional amounts can be preserved during intermediate billing steps instead of being forced into currency rounding too early.

This is especially important in high-volume usage billing, tiered rating, proration, and tax scenarios where many small amounts can add up over time.

How Invoice Rounding Is Performed #

Invoice rounding is currency-aware.

The system rounds invoice-facing values based on the currency minor unit configured for the account currency. For many currencies this is typically 2 decimal places, but the actual behavior follows the configured currency definition.

What this means is:

  • a value such as $12.2345 in a two-decimal currency is rounded to $12.23,
  • a currency with three decimal places can preserve three decimals,
  • and invoice totals follow the rules of the invoice currency rather than always forcing a two-decimal assumption.

The system uses midpoint rounding away from zero for currency rounding.

Carry Forward During Invoice Rounding #

When invoice amounts need to be rounded to the currency precision, LogiSense Billing does not simply round each amount in isolation and lose the difference.

Instead, the invoice logic carries forward the positive or negative remainder created by rounding and applies it to the next amount where needed.

What this means is:

  • if one invoice item rounds down by a fraction of a cent,
  • that remainder can be carried into the next applicable item,
  • and over the full invoice the system preserves the intended total more accurately.

This behavior is especially valuable when many small invoice items are present, such as usage, taxes, or discount-heavy invoices.

Invoice Item Amounts #

Invoice items are calculated first, then rounded for invoice presentation and totals.

Recurring charges, one-time charges, discounts, credits, and penalties can all be calculated at higher precision before currency rounding is applied where needed.

What this means is:

  • proration can calculate a partial-period value at higher precision,
  • discounts can reduce that amount at higher precision,
  • and the customer still sees a currency-valid invoice amount at the end.

This helps the invoice reflect the intended commercial calculation rather than a sequence of early rounding decisions.

Taxes #

Tax rounding follows a similar pattern: tax values are calculated at higher precision and then rounded appropriately for invoice use.

Tax records can store:

  • amount,
  • base amount,
  • invoice amount,
  • reportable amount,
  • and reportable base and invoice amounts

using internal precision before final invoice-facing rounding is applied.

What this means is:

  • tax calculations can remain accurate during processing,
  • currency-based invoice tax values still round correctly,
  • and tax totals can be aligned more cleanly to the invoice currency.

Tax Carry Forward Behavior #

Tax rounding also uses carry-forward logic in the invoice tax flow.

This is important because tax can be calculated across many invoice items, and rounding each tax line independently without adjustment can create small mismatches between detailed tax lines and summarized invoice tax totals.

What this means is:

  • small tax rounding variances are not simply dropped,
  • they can be applied forward across invoice tax lines,
  • and the invoice tax outcome stays closer to the intended total.

Tax-Inclusive Versus Tax-Exclusive Scenarios #

The rounding path is not identical for every tax scenario.

Tax-inclusive and tax-exclusive calculations follow different operational paths in the invoice tax logic, but both still preserve higher precision first and round invoice-facing values later.

What this means is:

  • the system can support different taxation models without sacrificing consistency in final invoice presentation,
  • and tax rounding behavior is driven by how the invoice item is taxed, not just by a single universal tax-rounding shortcut.

Usage Rated Amounts #

Usage-rated amounts can be rounded before they ever reach the invoice.

This happens during the rating process, based on the configuration applied to the usage rate group or the owner-level default if a rate group does not define its own rounding behavior.

The main controls are:

  • Amount Precision,
  • and Amount Rounding Type.

The supported rounding types include:

  • Round Half Up,
  • and Round Up.

What this means is:

  • a usage event can be rated and rounded according to rating policy before invoicing,
  • and invoice rounding is then a separate later step.

This distinction is important. Rating-time rounding determines the charge produced by the usage engine. Invoice-time rounding determines how invoice-facing amounts are expressed in the invoice currency.

Usage Rating Example #

Example:

  • a usage rate group is configured with Amount Precision = 4
  • and Amount Rounding Type = Round Half Up

Expected behavior:

  • each rated usage amount is rounded to 4 decimal places during rating,
  • that rounded rated amount is then used in later billing and invoicing steps,
  • and the invoice currency still determines the final invoice-facing rounding where applicable.

High-Precision Usage Scenarios #

The system also supports very high precision usage-rating scenarios, including configurations that round rated amounts to 11 decimal places.

This is particularly useful for:

  • high-volume usage billing,
  • progressive tier pricing,
  • usage amounts with very small unit costs,
  • and scenarios where individually rounding many tiny amounts too early could introduce measurable discrepancies.

What this means is:

  • usage can be rated with much more precision than the final invoice presentation requires,
  • and the business can decide how much precision should exist at rating time without changing invoice currency rules.

Usage Bucket And Overage Interaction #

In usage billing, rounding can also appear in bucket and overage processing.

When usage is rated after bucket consumption or tier processing, the remaining billable amount is rounded according to the configured usage rounding method and precision.

What this means is:

  • bucketed and overage outcomes are not just currency-rounded at the invoice stage,
  • they can already reflect rating-time rounding based on the applicable usage configuration,
  • and invoice rounding is still applied afterward as part of invoice presentation.

Why The Difference Between Rating Rounding And Invoice Rounding Matters #

One of the most common points of confusion is assuming that all rounding happens in one place.

In practice, LogiSense Billing applies rounding in layers:

  • rating-time rounding for usage charges,
  • internal high-precision storage for billing and tax calculations,
  • and currency-based rounding for invoice-facing results.

What this means is:

  • the same amount can exist first as a high-precision internal value,
  • then as a configured rated amount,
  • and finally as a currency-rounded invoice amount.

That is expected behavior, not an inconsistency.

Expected Invoice Outcomes #

From a customer and finance perspective, the main expected outcomes are:

  • invoice totals match the configured currency precision,
  • invoice item amounts may be derived from more precise internal calculations,
  • taxes round correctly to the invoice currency,
  • small rounding differences are carried forward rather than silently lost,
  • and usage charges can reflect both rating-time rounding and invoice-time rounding.

Why This Matters #

Rounding behavior matters because it affects trust in the billing result.

Businesses need the platform to:

  • preserve precision while calculating,
  • avoid revenue leakage from repeated small rounding losses,
  • produce invoice amounts that are valid for the invoiced currency,
  • support tax accuracy,
  • and handle usage billing consistently even at very small unit prices.

The practical result is a billing model that is both financially disciplined and operationally predictable.