sponsor Vim development Vim logo Vim Book Ad

fr-bareme-km : French tax mileage allowance scale (bareme kilometrique) 2022-2026

 script karma  Rating 0/0, Downloaded by 4  Comments, bugs, improvements  Vim wiki

created by
Rédaction MaCalculatrice
 
script type
utility
 
description
French tax mileage allowance scale ("bareme kilometrique"), used to deduct professional travel costs ("frais reels") from French income tax. Published by MaCalculatriceEnLigne, https://macalculatriceenligne.com/ .

- Tax returns 2022 to 2026 (income years 2021 to 2025)
- Cars, motorcycles (more than 50 cm3) and mopeds
- 135 rates, three distance bands per horsepower class
- 20 % increase for 100 % electric vehicles

Command:
  :BaremeKm {year} {car|moto|moped} {cv} {km} [electric]
  :BaremeKm 2026 car 5 4000
  2544.00 EUR  [2026 tax return, 2025 km, car cv5, band d <= 5000 km: d x 0.636]

Functions: frbaremekm#amount(year, vehicle, cv, km) and frbaremekm#amount_electric(year, vehicle, cv, km) return the amount in euros, rounded to the cent. Inputs outside the scale throw "frbaremekm: out of scale: year|vehicle|horsepower|distance". See :help fr-bareme-km.

The rates are generated from the Go package baremekm, itself a port of the SWI-Prolog pack fr_bareme_km 1.0.0; the tests replay each of the 135 facts of the pack and its test cases, and a cross-check of 9 576 entries against the Go package shows no difference. Official sources: BOFIP BOI-BAREME-000001 (2022, 2023), DGFiP brochures pratiques IR (2024 to 2026), service-public.gouv.fr A14686 (2026). Dataset: doi:10.17632/5s59m9wycw.1 (CC BY 4.0).

The same computation is available online, in French, with the detail of each band: https://macalculatriceenligne.com/finance/divers/calcul-frais-kilometriques/ .

This plugin is an aid to calculation, not tax advice. The official texts prevail. Code: MIT license.
 
install details
Unzip fr-bareme-km.zip into ~/.vim (Windows: ~/vimfiles), or into its own directory under ~/.vim/pack/plugins/start/ for Vim 8+ packages, then run :helptags ALL. Plugin managers (vim-plug, Vundle, Pathogen) can install the unzipped directory as is. Requires Vim 8.2 or later. Usage: :BaremeKm 2026 car 5 4000
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
fr-bareme-km.zip 0.1.0 2026-10-02 8.2 Rédaction MaCalculatrice Initial upload
ip used for rating: 216.73.216.128

Questions about Vim should go to the maillist. Help Uganda.     Vim at Github