| Did you know ... | Search Documentation: |
| Packs (add-ons) for SWI-Prolog |
| Title: | French tax mileage allowance scale (bareme kilometrique) 2022-2026: facts and calculator |
|---|---|
| Rating: | Not rated. Create the first rating! |
| Latest version: | 1.0.0 |
| SHA1 sum: | 24760e9afa2f8a7db0b7035944b6ccfd63319b48 |
| Author: | MaCalculatriceEnLigne <contact@macalculatriceenligne.com> |
| Maintainer: | MaCalculatriceEnLigne <contact@macalculatriceenligne.com> |
| Packager: | MaCalculatriceEnLigne <contact@macalculatriceenligne.com> |
| Home page: | https://macalculatriceenligne.com/finance/divers/calcul-frais-kilometriques/ |
| Download URL: | https://github.com/shoopeur-eng/fr_bareme_km/archive/refs/tags/v1.0.0.zip |
No reviews. Create the first review!.
| Version | SHA1 | #Downloads | URL |
|---|---|---|---|
| 1.0.0 | 24760e9afa2f8a7db0b7035944b6ccfd63319b48 | 1 | https://github.com/shoopeur-eng/fr_bareme_km/archive/refs/tags/v1.0.0.zip |
SWI-Prolog facts and calculator for the French tax mileage allowance scale ("bareme kilometrique"), used to deduct professional travel costs ("frais reels") from French income tax.
?- pack_install(fr_bareme_km).
?- use_module(library(fr_bareme_km)). % 2026 scale (2025 kilometres), 5 CV car, 4 000 km ?- frais_km(2026, automobile, 5, 4000, M). M = 2544. % Same car, 100 % electric (+20 %) ?- frais_km(2026, automobile, 5, 4000, [electrique(true)], M). M = 3052.8. % Raw facts ?- bareme_km(2026, motocyclette, cv_plus_de_5, T, F). T = tranche(0, 3000), F = formule(0.606, 0) ; T = tranche(3000, 6000), F = formule(0.079, 1583) ; T = tranche(6000, inf), F = formule(0.343, 0).
bareme_km(Annee, Vehicule, Classe, tranche(Min, Max), formule(Coef, Constante))
| Argument | Meaning |
|---|---|
| Annee | Year of the tax return (2022..2026). Kilometres are those of the previous year, see annee_revenus/2. |
| Vehicule | automobile, motocyclette, cyclomoteur |
| Classe | automobile: cv3_et_moins, cv4, cv5, cv6, cv7_et_plus; motocyclette: cv1_2, cv3_4_5, cv_plus_de_5; cyclomoteur: toutes |
| tranche | Band applies when Min < Km =< Max (first band 0 =< Km =< Max), inf for the last band |
| formule | Amount in euros = Km * Coef + Constante |
Predicates:
frais_km(+Annee, +Vehicule, +CV, +Km, -Montant): amount in euros, rounded to the cent.frais_km(+Annee, +Vehicule, +CV, +Km, +Options, -Montant): option electrique(true).classe_puissance(+Vehicule, +CV, -Classe): maps an integer horsepower to its class.The code applies the 20 % increase to the computed amount, as written in the tax code (CGI, annexe IV, art. 6 B, II). The DGFiP brochure also prints separate electric tables whose coefficients are rounded to three decimals; results can differ from those tables by less than one euro.
Every value was checked against the official text for its year:
| Declaration year | Income year | Official source |
|---|---|---|
| 2022 | 2021 | BOFIP BOI-BAREME-000001-20230720 |
| 2023 | 2022 | BOFIP BOI-BAREME-000001-20230720 |
| 2024 | 2023 | DGFiP brochure pratique IR 2024 |
| 2025 | 2024 | DGFiP brochure pratique IR 2025 |
| 2026 | 2025 | service-public.gouv.fr A14686 and DGFiP brochure pratique IR 2026 |
The scale was raised by 10 % in 2022 and by 5.4 % in 2023, then kept unchanged for the 2024, 2025 and 2026 tax returns.
Dataset: MaCalculatriceEnLigne, "Bareme kilometrique fiscal France 2022-2026", Mendeley Data, V1, doi:10.17632/5s59m9wycw.1 (CC BY 4.0).
This package is an aid to calculation, not tax advice. The official texts prevail.
cd test swipl -g run_tests -t halt test_fr_bareme_km.pl
Code: MIT (see LICENSE). Data: official French tax data under the Licence Ouverte / Open Licence (Etalab), see LICENSE for attribution.
Pack contains 5 files holding a total of 22.6K bytes.