percent pipe

This is the documentation for Angular 6.
You can switch to the latest version Angular 7.

Transforms a number to a percentage string, formatted according to locale rules that determine group sizing and separator, decimal-point character, and other locale-specific configurations.

<p>A: {{a | percent}}</p>
<p>B: {{b | percent:'4.3-5'}}</p>
export class AppComponent {
  a = 0.259;
  b = 1.3495;

A: 26%

B: 0,134.950%


{{ value_expression | percent [ : digitsInfo [ : locale ] ] }}


Decimal representation options.

digitsInfo?: string

Specified by a string in the following format:

  • minIntegerDigits: The minimum number of integer digits before the decimal point. Default is 1.
  • minFractionDigits: The minimum number of digits after the decimal point. Default is 0.
  • maxFractionDigits: The maximum number of digits after the decimal point. Default is 3.


A locale code for the locale format rules to use.

locale?: string

When not supplied, uses the value of LOCALE_ID, which is en-US by default. See Setting your app locale.