- Profit Margin Calculator Tool (Margin %, Markup %, Profit)
- VAT Checker Tool - Verify VAT Numbers Quickly
- Profit Calculator Tool — Profit, Margin, Markup & Break-even
- Online QR Generator for VAT Numbers
- Percentage Formatter for Matplotlib (PercentFormatter / FuncFormatter)
- ROI Checker CS2 — Calculate Profit, Fees, Break-even & Annualized Return
- VAT Checker EU - Validate European VAT Numbers
- ROI Checker (Return on Investment) — Calculate ROI %, Profit & Annualized Return
How to use
Use the formatter to generate the exact percent string you need and the matching Python snippet.
- Enter a number (e.g.,
0.1234or12.34). - Choose whether your input is a fraction (0–1) or a percent (0–100).
- Set decimals and options (trim zeros, commas, plus sign, parentheses for negatives).
- Click Format and copy the output/snippets.
FAQ
In Python, does the % format expect 0–1 or 0–100?
It expects a fraction (0–1). For example, 0.1234 becomes 12.34%; if you have 12.34, divide by 100 first.
What is the simplest way to format a percentage with 2 decimals?
Use an f-string: f"{x:.2%}" where x is a fraction.
How do I add thousand separators to percentages in Python?
Use the comma option in the spec: f"{x:,.2%}". This matters for large values (e.g., 12.3456 → 1,234.56%).
How can I show a plus sign for positive percentages?
Add + to the format spec: f"{x:+.2%}".
How do I use parentheses for negative percentages?
Python’s percent formatting doesn’t include parentheses by default; format normally and wrap negatives (e.g., if string starts with -, replace with (...)).
How do I format a pandas column as percentages?
Use map: df['pct_str'] = df['pct'].map('{:.2%}'.format). If your column is 0–100, do df['pct']=df['pct']/100 first.
How do I format matplotlib axis ticks as percentages?
Use matplotlib.ticker.PercentFormatter, typically with fractional data: ax.yaxis.set_major_formatter(mticker.PercentFormatter(xmax=1, decimals=2)).