Billing in increments requires a clear rounding policy. Derive the number of blocks before formatting a monetary amount.
Worked example
// components/BillableIncrementRounding.tsx
export default function BillableIncrementRounding({
hours = 8,
}: { hours?: number } = {}) {
return (
<output>
Chargeable hours: {Math.ceil(hours * 4) / 4} at quarter-hour intervals
</output>
);
}Implementation notes
Rounding each task separately can yield a different bill from rounding the complete session. Make the billable unit part of the component's contract.
Try it yourself
Compare a duration exactly on a boundary with one minute past it.
Open the React example →Editorial date October 19, 2026 · Published December 6, 2026