Billing practice

Billing increments, rounding and where the pennies leak

How 1/1, 6/6, 30/6 and 60/60 increments change what a call costs, and why rounding order and decimal storage decide whether invoices reconcile.

Rate per minute is the number everyone negotiates. Billing increment, duration rounding and the order of rounding steps decide what is actually charged. They also decide whether your invoice and your customer's recalculation agree to the cent. None of the three is exotic, and each one can move a month's revenue by several per cent.

Increments

An increment is written initial/next, in seconds. The first block billed is the initial one, and every further block is the next one. So 30/6 bills at least 30 seconds, then in steps of 6.

The rule for billable seconds, given a duration in whole seconds:

if duration is 0           billed = 0
if duration <= initial     billed = initial
otherwise                  billed = initial + ceil((duration - initial) / next) * next
amount = connect_fee + rate * billed / 60

Eight calls, at a rate of €0.0420 per minute and no connection fee:

Duration (s)1/16/630/660/60
3363060
88123060
3131363660
4747484860
61616666120
95959696120
122122126126180
185185186186240
Billed seconds552576618900
Amount€0.3864€0.4032€0.4326€0.6300

The same traffic at the same headline rate costs €0.3864 or €0.6300 depending on the increment. A rate of €0.0420 at 60/60 is, on this mix, equivalent to €0.0685 at 1/1 (900 / 552 × 0.0420). Two decks with equal rates and different increments are different prices, and a customer comparing vendors should compare effective cost per minute on their own call mix. The same applies to a carrier comparing sell and buy decks, as covered in our post on rating every call twice.

Short calls are where increments bite. A network with a high share of calls under 10 seconds, such as autodialler traffic, sees the largest gap between 1/1 and 60/60.

Duration rounding comes first

The SBC reports a duration with fractional seconds. Before the increment applies, the fractional part has to become whole seconds, and the two directions are both in use:

ReportedRound upRound down
61.4 s62 s61 s
61.9 s62 s61 s
2.1 s3 s2 s

Which one applies is a matter of each agreement, and a carrier can have one setting on the sell side and another on the buy side. The average difference is half a second a call. At €0.0420 per minute that is €0.00035 a call, or €350 per million calls. It sounds small. It is also the commonest cause of a vendor bill that is higher than your own rating by a steady fraction of a per cent, which our post on reconciling vendor bills deals with.

Keep the fractional duration on the CDR and apply the rounding at rating time, per side. Rounding at ingestion loses the information that the other side's rule needs.

Precision: store exact decimals

Floating-point numbers cannot represent most decimal fractions exactly. The classic demonstration:

SELECT 0.1::float8 + 0.2::float8 = 0.3::float8 AS float_equal,
       0.1::numeric + 0.2::numeric = 0.3::numeric AS numeric_equal;

The first column is false and the second is true. Over millions of charges the drift of binary floating point becomes visible as sums that differ in the last cent. Store rates and amounts as exact decimals (numeric in PostgreSQL, decimal elsewhere). Wholesale rates need four to six decimal places, so a column with six places is a sensible default.

Rounding: when and how many times

Rating computes on the exact rate. The question is how many digits you keep at each step, and whether you round per call or once per invoice line.

Take seven short calls to the same destination at €0.0123 per minute, billed 1/1:

SecondsExactRounded to 2 placesRounded to 4 places
17€0.003485€0.00€0.0035
23€0.004715€0.00€0.0047
41€0.008405€0.01€0.0084
9€0.001845€0.00€0.0018
58€0.011890€0.01€0.0119
12€0.002460€0.00€0.0025
33€0.006765€0.01€0.0068
Sum€0.039565€0.03€0.0396

Rounding each call to cents gives €0.03 for traffic worth €0.0396, a loss of about a quarter. Scaled up: a million calls of €0.0035 each round half-up to €0.00 each, so an invoice for €3,500 of traffic would read €0.

The reverse can also happen. If every call is rounded up to the next cent, the customer pays more than the rate card says. Either way, per-call rounding to the currency's minor unit biases the total, and a customer who recomputes from their own CDRs will not match you.

A rule that reconciles:

  1. Compute each call at the exact rate, then round half-up to six places. Six places is the working precision; the invoice gets two later.
  2. Sum the calls on each invoice line (destination, time band, rate) at that precision.
  3. Round the line to two places, once.
  4. Make the invoice total the sum of the rounded lines, so the document foots when someone adds it up.

Rounding once per line still leaves a cent here and there. Three lines of €10.005 each total €30.015, which rounds to €30.02, while rounding each line half-up gives €10.01 × 3 = €30.03. Choose a rule, state it in the contract, and apply it the same way on every invoice. The line should show the count, the rate and the amount, so a customer can check that count × rate explains the amount.

Connection fees and minimums

A per-call connection fee is added once to each answered call. Some decks also state a minimum charge per call. Both belong on the call's charge, not as an invoice-level adjustment, so that per-call margin includes them. A fee of €0.0050 on 100,000 calls is €500, and it vanishes from margin reports if it lives only on the invoice.

Where the pennies leak

  • Increment mismatch between a customer's deck and a vendor's, covered above.
  • Rounding direction applied differently on the sell side and the buy side.
  • Per-call rounding to the currency's minor unit.
  • Binary floating point anywhere between the CDR and the ledger.
  • Fees held outside the call, which disappear from margin.
  • Rate precision too coarse for the deck. A rate quoted at €0.00345 and stored at €0.0035 overcharges by 1.4%.

A short checklist

  1. Record each deck's initial and next increments per rate row, with the deck default as fallback.
  2. Keep fractional seconds on the CDR and choose the rounding direction per contract, per side.
  3. Store money as exact decimals, with six places on rates and charges.
  4. Round the line once, sum the lines, and show count × rate on the invoice.
  5. Put connection fees and minimums on the call's charge.
  6. Write the rounding rule into the contract.

More from the blog

Contact sales

Talk to us about your traffic and your billing.

Tell us about your network and we will arrange a demonstration of YepSBC, YepMsg, YepShield, YepBoss and YepPBX on a traffic profile like yours, or a technical call with one of our engineers.

  1. We reply within one business day to arrange a time.
  2. A scoping call about your traffic, network and billing model.
  3. A demonstration on a traffic profile like yours, and a lab deployment if your engineers want one.

Prefer email? hello@yeptelcosoft.com

What would you like?
Interested in

We reply within one business day. We use your details only to respond to your request. Privacy notice