finance.margin
Profit on a sale with both the margin and the markup, so the two are never confused.
margin in Python
1.0.0
py rs ts
13 tests
finance.markup-price
Selling price from a cost and a target margin or markup in basis points, with explicit rounding.
markup_price in Python
1.0.0
py rs ts
21 tests
finance.ledger.trial-balance
Trial balance from journal lines: debit or credit balance per account, and proof that debits equal credits.
trial_balance in Python
1.0.0
py rs ts
13 tests
finance.aged-debt
Aged debt report: open invoices bucketed as current, 1-30, 31-60, 61-90 and 90+ days overdue as at a date.
aged_debt in Python
1.0.0
py rs ts
13 tests
finance.accruals-prepayments
Split an invoice across accounting periods by days of service, for accruals, prepayments and deferred income.
allocate_to_periods in Python
1.0.0
py rs ts
17 tests
finance.early-payment-discount
Early settlement discount available on a payment date under "2/10 net 30" style terms, and the amount to pay.
early_payment_discount in Python
1.0.0
py rs ts
16 tests
finance.proration
Split an amount into the part used and the part unused over a billing period, losing nothing.
prorate in Python
1.0.0
py rs ts
16 tests
1.0.0
py rs ts
15 tests
finance.depreciation-reducing-balance
Reducing-balance depreciation schedule at a fixed rate, writing off to the residual value in the final year.
reducing_balance_depreciation in Python
1.0.0
py rs ts
17 tests
finance.invoice.calculate
Calculate a complete invoice: line nets, VAT per line, totals and a VAT summary grouped by rate.
calculate_invoice in Python
1.0.1
py rs ts
15 tests
finance.compound-interest
Compound interest accrued period by period in minor units, the way a statement is built.
compound_interest in Python
1.0.0
py rs ts
18 tests
finance.credit-note.calculate
Credit note against an original invoice, by units or by amount, with VAT at the original tax point's rates.
calculate_credit_note in Python
1.0.0
py rs ts
21 tests
finance.ledger.journal-validate
Check a double-entry journal: debits equal credits, no zero or two-sided lines, one currency, well-formed account codes.
validate_journal in Python
1.0.0
py rs ts
16 tests
finance.payment-terms-due-date
Invoice due date from payment terms: net N days, end of month, N days after month end, day N of next month.
payment_due_date in Python
1.0.0
py rs ts
26 tests
1.0.0
py rs ts
9 tests
finance.late-payment-interest
UK statutory late payment interest (8% over Bank Rate) and fixed compensation under the Late Payment Act 1998.
late_payment_interest in Python
1.0.1
py rs ts
18 tests
finance.fx-revaluation
Unrealised foreign exchange gain or loss on foreign-currency balances revalued at a period-end rate.
fx_revaluation in Python
1.0.0
py rs ts
14 tests
finance.bank-reconcile-match
Match bank statement lines to ledger entries by exact amount, a date window and reference similarity, deterministically.
match_bank_lines in Python
1.0.0
py rs ts
19 tests
finance.tax.add-vat Unreviewed
Add VAT to a net amount using the rate in force on the date of supply.
add_vat in Python
1.0.1
py rs ts
9 tests
insurance.instalment-plan Unreviewed
Pay a premium by monthly instalments: deposit, flat credit charge, instalments exact to the penny, and the APR.
instalment_plan in Python
1.0.1
py rs ts
15 tests
finance.uk-bank-rate
Bank of England Bank Rate (base rate) in force on a date, from the Bank's official history since 2001.
uk_bank_rate in Python
1.0.1
py rs ts
14 tests
finance.tax.vat-return Unreviewed
UK nine-box VAT return totals for a period from categorised sales and purchases (VAT Notice 700/12).
vat_return in Python
1.0.1
py rs ts
19 tests
finance.tax.remove-vat Unreviewed
Extract the VAT already included in a gross amount, using the rate in force on the date of supply.
remove_vat in Python
1.0.2
py rs ts
20 tests
finance.tax.vat-rate Unreviewed
Look up the VAT rate in force for a jurisdiction, category and date.
vat_rate in Python
1.2.2
py rs ts
25 tests
finance.tax.vat-flat-rate Unreviewed
UK VAT Flat Rate Scheme: VAT due on gross turnover at the sector's dated rate, limited cost rate and first-year 1% off.
flat_rate_vat in Python
1.0.1
py rs ts
23 tests
subscriptions.invoice
A subscription renewal invoice: plan, add-ons and usage, coupon discounts by billing period, and VAT.
renewal_invoice in Python
1.0.0
py rs ts
19 tests
hospitality.gross-profit-menu
Menu gross profit (GP%) on the VAT-exclusive price, and the menu price that reaches a target GP.
A group of 2: menu_gross_profit, menu_price_for_gp
1.0.0
py rs ts
20 tests
retail.basket-total
Total a basket: line prices, promotions, a basket discount, VAT per line and delivery, into one checked total.
basket_total in Python
1.0.0
py rs ts
10 tests
energy.bill-calculate
Electricity or gas bill from two meter reads: energy, standing charge, Climate Change Levy and VAT.
calculate_energy_bill in Python
1.0.0
py rs ts
15 tests
legal.statutory-interest Unreviewed
Statutory interest on a judgment debt (8% simple, daily) or a late commercial debt, England and Wales.
statutory_interest in Python
1.0.1
py rs ts
19 tests
logistics.duty-estimate Unreviewed
Estimate import duty and import VAT on goods: customs value on a CIF basis, the caller's duty rate, VAT on top.
duty_estimate in Python
1.0.1
py rs ts
17 tests
math.fractional-power
Raise a positive decimal to a fractional power, (1.199)^(31/365), identically in every language.
fractional_power in Python
1.0.0
py rs ts
19 tests
invest.isa-allowance Unreviewed
ISA allowance used and remaining for a UK tax year: the overall limit, Lifetime ISA, cash ISA and Junior ISA.
isa_allowance in Python
1.0.2
py rs ts
30 tests
construction.valuation
Interim valuation: gross value to date, retention, previous payments, amount due, VAT or reverse charge, and CIS.
interim_valuation in Python
1.0.0
py rs ts
16 tests
fleet.mileage-allowance
HMRC approved mileage allowance payments for an employee's own vehicle: tax-free amount, taxable excess or relief.
mileage_allowance in Python
1.0.2
py rs ts
23 tests
banking.savings-aer
AER (annual equivalent rate) from a gross nominal rate and how often interest is paid, to two decimal places.
savings_aer in Python
1.0.0
py rs ts
14 tests
legal.time-billing Unreviewed
Fees from time entries: each rounded to 6-minute (or other) units and priced at the fee earner's hourly rate.
time_billing in Python
1.0.1
py rs ts
15 tests
charity.gift-aid
Gift Aid a UK charity can claim on a donation: basic rate tax grossed up, 25p per £1 at 20%.
gift_aid in Python
1.0.2
py rs ts
15 tests
charity.gift-aid-eligibility
Whether a UK donation qualifies for Gift Aid: declaration, enough tax paid, and the donor benefit limits.
gift_aid_eligibility in Python
1.0.2
py rs ts
25 tests
charts.format
Axis and label text for charts: tick numbers, SI prefixes (1.2k, 3.4M), percentages, dates and money.
A group of 5: format_tick, format_si, format_percent, format_date, format_money_tick
1.0.0
py rs ts
61 tests
construction.vat-reverse-charge
Whether the UK VAT domestic reverse charge applies to a construction supply, and the invoice wording.
domestic_reverse_charge in Python
1.0.2
py rs ts
24 tests
hospitality.room-rate
Price a hotel stay night by night from the caller's seasonal, day-of-week rate table, less any length-of-stay discount.
room_rate in Python
1.0.0
py rs ts
18 tests
1.0.0
py rs ts
19 tests
math.percent-change
Percentage change from one value to another, in basis points, with an explicit rounding mode.
percent_change in Python
1.0.0
py rs ts
19 tests
subscriptions.proration
Mid-cycle plan change: credit for unused time on the old plan and charge for the rest of the period on the new one.
prorate_change in Python
1.0.0
py rs ts
17 tests
insurance.ipt Unreviewed
UK Insurance Premium Tax at the standard or higher rate in force on a date, added to or taken out of a premium.
insurance_premium_tax in Python
1.0.2
py rs ts
23 tests
legal.disbursements-vat Unreviewed
Whether a cost passed to a client is a VAT disbursement (outside scope) or a recharge (VAT due), per HMRC Notice 700.
disbursement_vat in Python
1.0.1
py rs ts
14 tests
lending.early-settlement Unreviewed
Early settlement figure and rebate on UK regulated consumer credit, per the Early Settlement Regulations 2004.
early_settlement in Python
1.0.1
py rs ts
18 tests
property.completion-statement Unreviewed
A buyer's completion statement: price less deposit, ground rent and service charge apportioned to completion, plus fees.
completion_statement in Python
1.0.1
py rs ts
15 tests
property.council-tax-band Unreviewed
Council tax for a valuation band from the Band D charge: the statutory band ratio, England, Wales and Scotland.
council_tax_band in Python
1.0.2
py rs ts
24 tests
insurance.premium-proration Unreviewed
Return premium on mid-term cancellation, pro rata or on a short-period scale, with an optional minimum retained premium.
cancellation_return_premium in Python
1.0.1
py rs ts
26 tests
retail.sales-tax-us Unreviewed
US sales tax on a sale: the state's base rate from dated data plus a local rate the caller supplies.
sales_tax_us in Python
1.1.1
py rs ts
22 tests
fleet.company-car-bik Unreviewed
UK company car benefit in kind: appropriate percentage by CO2 and electric range, car and fuel benefit for a tax year.
company_car_bik in Python
1.0.2
py rs ts
37 tests
education.fee-instalments
Tuition fee instalment schedule from a total, shares and due dates, exact to the penny.
fee_instalments in Python
1.0.0
py rs ts
20 tests
lending.affordability Unreviewed
Debt-to-income and a stressed-rate affordability test for a proposed loan's monthly repayment.
affordability in Python
1.0.1
py rs ts
13 tests
education.student-loan-repayment
A graduate's student or postgraduate loan repayment for a tax year, as Self Assessment works it out.
student_loan_repayment in Python
1.0.1
py rs ts
21 tests
payroll.student-loan Unreviewed
Student loan or postgraduate loan deduction from one period's pay, by plan, rounded down to whole pounds.
student_loan in Python
1.0.2
py rs ts
24 tests
inventory.valuation-fifo
FIFO stock valuation and cost of sales from a stock movement ledger, in exact money.
fifo_valuation in Python
1.0.0
py rs ts
18 tests
fleet.vehicle-depreciation
A vehicle's current value from its cost, age and mileage, on retention curves the caller supplies, exactly.
vehicle_depreciation in Python
1.0.0
py rs ts
20 tests
insurance.loss-ratio Unreviewed
Loss ratio, expense ratio and combined ratio in basis points, from earned premium, incurred claims and expenses.
loss_ratios in Python
1.0.1
py rs ts
12 tests
lending.loan-payment Unreviewed
Level repayment for a loan (annuity formula), computed exactly and rounded once, the way you choose.
loan_payment in Python
1.0.1
py rs ts
23 tests
money.allocate
Split an amount across ratios without losing or inventing a single minor unit.
allocate in Python
1.0.1
py rs ts
17 tests
professional.utilisation
Billable utilisation and billing, collection and overall realisation rates, in basis points.
utilisation_rates in Python
1.0.0
py rs ts
13 tests
invest.fee-drag Unreviewed
What an annual charge costs an investment over the years: value with and without the fee, year by year, in minor units.
fee_drag in Python
1.0.1
py rs ts
20 tests
legal.retainer-drawdown Unreviewed
Apply money held on account in client account to bills in order: what each bill takes, what stays due, what is left.
retainer_drawdown in Python
1.0.1
py rs ts
11 tests
fleet.cost-per-mile
Whole-life cost per mile of a vehicle, in tenths of a penny, from depreciation, fuel, maintenance, insurance and tax.
cost_per_mile in Python
1.0.0
py rs ts
13 tests
lending.daily-interest Unreviewed
Interest accrued day by day on a changing balance under a day-count convention, summed exactly and rounded once.
daily_interest in Python
1.0.1
py rs ts
21 tests
charity.restricted-funds
Allocate charity spending to restricted funds first, then unrestricted funds, never overdrawing a restricted fund.
allocate_fund_spend in Python
1.0.0
py rs ts
17 tests
lending.amortisation-schedule Unreviewed
Repayment schedule for a level-payment loan: interest, principal and balance per period, ending at exactly zero.
amortisation_schedule in Python
1.0.1
py rs ts
13 tests
lending.apr Unreviewed
Consumer-credit APR from drawdowns and repayments, by the FCA CONC App 1.2.6 equation, to one decimal place.
apr in Python
1.0.1
py rs ts
22 tests
payroll.national-insurance Unreviewed
Employee and employer Class 1 National Insurance for one payment by category letter, exact percentage method.
national_insurance in Python
1.0.2
py rs ts
29 tests
banking.fees-cap
Apply a monthly fee cap to a list of account charges: charge up to the cap, waive the rest.
apply_fee_cap in Python
1.0.0
py rs ts
18 tests
property.mortgage-affordability Unreviewed
Mortgage affordability: the loan-to-income multiple and a stress-tested repayment against income, both checked.
mortgage_affordability in Python
1.0.1
py rs ts
13 tests
payroll.pension-auto-enrolment Unreviewed
Workplace pension contributions for one pay period: qualifying earnings band, employee and employer shares, tax relief.
pension_contributions in Python
1.0.2
py rs ts
22 tests
subscriptions.ltv-cac
Customer lifetime value, LTV to CAC ratio and CAC payback months from ARPA, gross margin, churn and CAC.
ltv_cac in Python
1.0.0
py rs ts
14 tests
property.service-charge-apportion Unreviewed
Apportion a service charge across units by lease fraction, floor area or fixed percentage, exact to the penny.
apportion_service_charge in Python
1.0.1
py rs ts
19 tests
money.apply-rate
Apply a rate expressed in basis points to a monetary amount, with an explicit rounding mode.
apply_rate in Python
1.0.1
py rs ts
22 tests
legal.court-fee Unreviewed
The court fee to issue a money claim in England and Wales, from the claim value bands in force on a date.
court_fee in Python
1.0.2
py rs ts
27 tests
invest.cagr Unreviewed
Compound annual growth rate between two values over a whole or fractional number of years, in basis points.
cagr in Python
1.0.1
py rs ts
22 tests