# x-bar icon

X bar. Gentleface icon, drawn on the 16 px pixel grid. Free, MIT licensed. Page: https://gentleface.com/icons/x-bar

- Category: Math & symbols
- Use it for: mean, average, sample mean
- Tags: x-bar, x bar, mean, average, sample mean, x̄, statistics, stats, aggregate, spreadsheet, formula, math
- Component name: XBarIcon
- Added: 2026-11-07
- Since: version 0.5.0
- npm: `import { XBarIcon } from '@gentleface/react';` (@gentleface/react 0.6.0)

## Files

Each icon is drawn on the 16 px grid, and most also on the 20 and 24 px grids (at 24 in three weights: light 1 px, regular 1.5 px, bold 2 px). Show the drawing made for your size, or an exact multiple of it, on whole pixels: 16 for 16 and 32 px, 20 for 20 and 40, 24 for 24 and 48. A size in between or a fractional position blurs it. The code on each icon page is the 16 px drawing, an SVG with fill="currentColor"; the icon page's downloads follow its Grid switch, and npm has the 20 and 24 px drawings too.

- line-round: https://gentleface.com/svg/line-round/16/x-bar.svg · PNG https://gentleface.com/png/line-round/16/x-bar.png · https://gentleface.com/png/line-round/32/x-bar.png · https://gentleface.com/png/line-round/48/x-bar.png
- line-soft: https://gentleface.com/svg/line-soft/16/x-bar.svg · PNG https://gentleface.com/png/line-soft/16/x-bar.png · https://gentleface.com/png/line-soft/32/x-bar.png · https://gentleface.com/png/line-soft/48/x-bar.png
- line-sharp: https://gentleface.com/svg/line-sharp/16/x-bar.svg · PNG https://gentleface.com/png/line-sharp/16/x-bar.png · https://gentleface.com/png/line-sharp/32/x-bar.png · https://gentleface.com/png/line-sharp/48/x-bar.png
- solid-round: https://gentleface.com/svg/solid-round/16/x-bar.svg · PNG https://gentleface.com/png/solid-round/16/x-bar.png · https://gentleface.com/png/solid-round/32/x-bar.png · https://gentleface.com/png/solid-round/48/x-bar.png
- solid-soft: https://gentleface.com/svg/solid-soft/16/x-bar.svg · PNG https://gentleface.com/png/solid-soft/16/x-bar.png · https://gentleface.com/png/solid-soft/32/x-bar.png · https://gentleface.com/png/solid-soft/48/x-bar.png
- solid-sharp: https://gentleface.com/svg/solid-sharp/16/x-bar.svg · PNG https://gentleface.com/png/solid-sharp/16/x-bar.png · https://gentleface.com/png/solid-sharp/32/x-bar.png · https://gentleface.com/png/solid-sharp/48/x-bar.png

The SVG of every style: https://gentleface.com/icons/x-bar.json (`svg`).

## Code (line-round)

The snippets are decorative (aria-hidden). For an icon that carries meaning on its own, such as an icon-only button, label the button, or give the SVG role="img" and an aria-label. For another style, take its SVG from the JSON and swap the path `d`.

### SVG

```svg
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M3.144 2.856C3.048 2.759 3 2.641 3 2.5C3 2.359 3.048 2.241 3.144 2.144C3.241 2.048 3.359 2 3.5 2L11.5 2C11.641 2 11.759 2.048 11.856 2.144C11.952 2.241 12 2.359 12 2.5C12 2.641 11.952 2.759 11.856 2.856C11.759 2.952 11.641 3 11.5 3L3.5 3C3.359 3 3.241 2.952 3.144 2.856ZM4.24 12.267L6.546 8.953L3.807 4.999L5.746 4.999L7.546 7.784L7.592 7.784L9.275 5.224L9.275 5.224L9.423 4.999L11.224 4.999L10.71 5.738L10.71 5.738L8.485 8.938L11.27 13L9.331 13L9.184 12.769L9.184 12.768L7.485 10.092L7.438 10.092L5.663 12.776L5.663 12.776L5.515 13L3.73 13L4.239 12.268L4.24 12.267Z"/></svg>
```

### React

```tsx
// Gentleface "x-bar" (line-round), MIT. https://gentleface.com/icons/x-bar
import type { SVGProps } from 'react';

export function XBarIcon(props: SVGProps<SVGSVGElement>) {
  return (
    <svg xmlns="http://www.w3.org/2000/svg" width={16} height={16} viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" {...props}>
      <path d="M3.144 2.856C3.048 2.759 3 2.641 3 2.5C3 2.359 3.048 2.241 3.144 2.144C3.241 2.048 3.359 2 3.5 2L11.5 2C11.641 2 11.759 2.048 11.856 2.144C11.952 2.241 12 2.359 12 2.5C12 2.641 11.952 2.759 11.856 2.856C11.759 2.952 11.641 3 11.5 3L3.5 3C3.359 3 3.241 2.952 3.144 2.856ZM4.24 12.267L6.546 8.953L3.807 4.999L5.746 4.999L7.546 7.784L7.592 7.784L9.275 5.224L9.275 5.224L9.423 4.999L11.224 4.999L10.71 5.738L10.71 5.738L8.485 8.938L11.27 13L9.331 13L9.184 12.769L9.184 12.768L7.485 10.092L7.438 10.092L5.663 12.776L5.663 12.776L5.515 13L3.73 13L4.239 12.268L4.24 12.267Z" />
    </svg>
  );
}
```

### Vue

```vue
<!-- Gentleface "x-bar" (line-round), MIT. https://gentleface.com/icons/x-bar -->
<template>
  <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true">
    <path d="M3.144 2.856C3.048 2.759 3 2.641 3 2.5C3 2.359 3.048 2.241 3.144 2.144C3.241 2.048 3.359 2 3.5 2L11.5 2C11.641 2 11.759 2.048 11.856 2.144C11.952 2.241 12 2.359 12 2.5C12 2.641 11.952 2.759 11.856 2.856C11.759 2.952 11.641 3 11.5 3L3.5 3C3.359 3 3.241 2.952 3.144 2.856ZM4.24 12.267L6.546 8.953L3.807 4.999L5.746 4.999L7.546 7.784L7.592 7.784L9.275 5.224L9.275 5.224L9.423 4.999L11.224 4.999L10.71 5.738L10.71 5.738L8.485 8.938L11.27 13L9.331 13L9.184 12.769L9.184 12.768L7.485 10.092L7.438 10.092L5.663 12.776L5.663 12.776L5.515 13L3.73 13L4.239 12.268L4.24 12.267Z" />
  </svg>
</template>
```

### Svelte

```svelte
<!-- Gentleface "x-bar" (line-round), MIT. https://gentleface.com/icons/x-bar -->
<script>
  let props = $props();
</script>

<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" {...props}>
  <path d="M3.144 2.856C3.048 2.759 3 2.641 3 2.5C3 2.359 3.048 2.241 3.144 2.144C3.241 2.048 3.359 2 3.5 2L11.5 2C11.641 2 11.759 2.048 11.856 2.144C11.952 2.241 12 2.359 12 2.5C12 2.641 11.952 2.759 11.856 2.856C11.759 2.952 11.641 3 11.5 3L3.5 3C3.359 3 3.241 2.952 3.144 2.856ZM4.24 12.267L6.546 8.953L3.807 4.999L5.746 4.999L7.546 7.784L7.592 7.784L9.275 5.224L9.275 5.224L9.423 4.999L11.224 4.999L10.71 5.738L10.71 5.738L8.485 8.938L11.27 13L9.331 13L9.184 12.769L9.184 12.768L7.485 10.092L7.438 10.092L5.663 12.776L5.663 12.776L5.515 13L3.73 13L4.239 12.268L4.24 12.267Z" />
</svg>
```

### HTML img

```html
<!-- Gentleface "x-bar" (line-round), MIT. https://gentleface.com/icons/x-bar. An <img> can't take currentColor: it draws black. Inline the SVG or use the CSS mask to color it. -->
<img src="https://gentleface.com/svg/line-round/16/x-bar.svg" width="16" height="16" alt="">
```

### CSS

```css
/* Gentleface "x-bar" (line-round), MIT. https://gentleface.com/icons/x-bar. Takes the text color. */
.icon-x-bar {
  display: inline-block;
  width: 16px;
  height: 16px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='currentColor'%3E%3Cpath d='M3.144 2.856C3.048 2.759 3 2.641 3 2.5C3 2.359 3.048 2.241 3.144 2.144C3.241 2.048 3.359 2 3.5 2L11.5 2C11.641 2 11.759 2.048 11.856 2.144C11.952 2.241 12 2.359 12 2.5C12 2.641 11.952 2.759 11.856 2.856C11.759 2.952 11.641 3 11.5 3L3.5 3C3.359 3 3.241 2.952 3.144 2.856ZM4.24 12.267L6.546 8.953L3.807 4.999L5.746 4.999L7.546 7.784L7.592 7.784L9.275 5.224L9.275 5.224L9.423 4.999L11.224 4.999L10.71 5.738L10.71 5.738L8.485 8.938L11.27 13L9.331 13L9.184 12.769L9.184 12.768L7.485 10.092L7.438 10.092L5.663 12.776L5.663 12.776L5.515 13L3.73 13L4.239 12.268L4.24 12.267Z'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='currentColor'%3E%3Cpath d='M3.144 2.856C3.048 2.759 3 2.641 3 2.5C3 2.359 3.048 2.241 3.144 2.144C3.241 2.048 3.359 2 3.5 2L11.5 2C11.641 2 11.759 2.048 11.856 2.144C11.952 2.241 12 2.359 12 2.5C12 2.641 11.952 2.759 11.856 2.856C11.759 2.952 11.641 3 11.5 3L3.5 3C3.359 3 3.241 2.952 3.144 2.856ZM4.24 12.267L6.546 8.953L3.807 4.999L5.746 4.999L7.546 7.784L7.592 7.784L9.275 5.224L9.275 5.224L9.423 4.999L11.224 4.999L10.71 5.738L10.71 5.738L8.485 8.938L11.27 13L9.331 13L9.184 12.769L9.184 12.768L7.485 10.092L7.438 10.092L5.663 12.776L5.663 12.776L5.515 13L3.73 13L4.239 12.268L4.24 12.267Z'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
}
```

### Data URL

```text
data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='currentColor'%3E%3Cpath d='M3.144 2.856C3.048 2.759 3 2.641 3 2.5C3 2.359 3.048 2.241 3.144 2.144C3.241 2.048 3.359 2 3.5 2L11.5 2C11.641 2 11.759 2.048 11.856 2.144C11.952 2.241 12 2.359 12 2.5C12 2.641 11.952 2.759 11.856 2.856C11.759 2.952 11.641 3 11.5 3L3.5 3C3.359 3 3.241 2.952 3.144 2.856ZM4.24 12.267L6.546 8.953L3.807 4.999L5.746 4.999L7.546 7.784L7.592 7.784L9.275 5.224L9.275 5.224L9.423 4.999L11.224 4.999L10.71 5.738L10.71 5.738L8.485 8.938L11.27 13L9.331 13L9.184 12.769L9.184 12.768L7.485 10.092L7.438 10.092L5.663 12.776L5.663 12.776L5.515 13L3.73 13L4.239 12.268L4.24 12.267Z'/%3E%3C/svg%3E
```

### Sprite

```html
<!-- Gentleface "x-bar" (line-round), MIT. https://gentleface.com/icons/x-bar
     Every icon of this style in one file: https://gentleface.com/sprite/line-round.svg
     Serve it from your own origin: <use> does not load from another origin. -->
<svg width="16" height="16" aria-hidden="true"><use href="/sprite/line-round.svg#x-bar"/></svg>
```

### SwiftUI

```swift
// Gentleface "x-bar" (line-round), MIT. https://gentleface.com/icons/x-bar
import SwiftUI

struct XBarIcon: Shape {
    func path(in rect: CGRect) -> Path {
        var p = Path()
        p.move(to: CGPoint(x: 3.144, y: 2.856))
        p.addCurve(to: CGPoint(x: 3, y: 2.5), control1: CGPoint(x: 3.048, y: 2.759), control2: CGPoint(x: 3, y: 2.641))
        p.addCurve(to: CGPoint(x: 3.144, y: 2.144), control1: CGPoint(x: 3, y: 2.359), control2: CGPoint(x: 3.048, y: 2.241))
        p.addCurve(to: CGPoint(x: 3.5, y: 2), control1: CGPoint(x: 3.241, y: 2.048), control2: CGPoint(x: 3.359, y: 2))
        p.addLine(to: CGPoint(x: 11.5, y: 2))
        p.addCurve(to: CGPoint(x: 11.856, y: 2.144), control1: CGPoint(x: 11.641, y: 2), control2: CGPoint(x: 11.759, y: 2.048))
        p.addCurve(to: CGPoint(x: 12, y: 2.5), control1: CGPoint(x: 11.952, y: 2.241), control2: CGPoint(x: 12, y: 2.359))
        p.addCurve(to: CGPoint(x: 11.856, y: 2.856), control1: CGPoint(x: 12, y: 2.641), control2: CGPoint(x: 11.952, y: 2.759))
        p.addCurve(to: CGPoint(x: 11.5, y: 3), control1: CGPoint(x: 11.759, y: 2.952), control2: CGPoint(x: 11.641, y: 3))
        p.addLine(to: CGPoint(x: 3.5, y: 3))
        p.addCurve(to: CGPoint(x: 3.144, y: 2.856), control1: CGPoint(x: 3.359, y: 3), control2: CGPoint(x: 3.241, y: 2.952))
        p.closeSubpath()
        p.move(to: CGPoint(x: 4.24, y: 12.267))
        p.addLine(to: CGPoint(x: 6.546, y: 8.953))
        p.addLine(to: CGPoint(x: 3.807, y: 4.999))
        p.addLine(to: CGPoint(x: 5.746, y: 4.999))
        p.addLine(to: CGPoint(x: 7.546, y: 7.784))
        p.addLine(to: CGPoint(x: 7.592, y: 7.784))
        p.addLine(to: CGPoint(x: 9.275, y: 5.224))
        p.addLine(to: CGPoint(x: 9.275, y: 5.224))
        p.addLine(to: CGPoint(x: 9.423, y: 4.999))
        p.addLine(to: CGPoint(x: 11.224, y: 4.999))
        p.addLine(to: CGPoint(x: 10.71, y: 5.738))
        p.addLine(to: CGPoint(x: 10.71, y: 5.738))
        p.addLine(to: CGPoint(x: 8.485, y: 8.938))
        p.addLine(to: CGPoint(x: 11.27, y: 13))
        p.addLine(to: CGPoint(x: 9.331, y: 13))
        p.addLine(to: CGPoint(x: 9.184, y: 12.769))
        p.addLine(to: CGPoint(x: 9.184, y: 12.768))
        p.addLine(to: CGPoint(x: 7.485, y: 10.092))
        p.addLine(to: CGPoint(x: 7.438, y: 10.092))
        p.addLine(to: CGPoint(x: 5.663, y: 12.776))
        p.addLine(to: CGPoint(x: 5.663, y: 12.776))
        p.addLine(to: CGPoint(x: 5.515, y: 13))
        p.addLine(to: CGPoint(x: 3.73, y: 13))
        p.addLine(to: CGPoint(x: 4.239, y: 12.268))
        p.addLine(to: CGPoint(x: 4.24, y: 12.267))
        p.closeSubpath()
        return p.applying(CGAffineTransform(scaleX: rect.width / 16, y: rect.height / 16))
    }
}

// XBarIcon().frame(width: 16, height: 16) fills with the foreground style. Keep it on whole points to stay crisp.
```

### Compose

```kotlin
// Gentleface "x-bar" (line-round), MIT. https://gentleface.com/icons/x-bar
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.SolidColor
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.graphics.vector.addPathNodes
import androidx.compose.ui.unit.dp

val XBarIcon: ImageVector by lazy {
    ImageVector.Builder(
        name = "x-bar", defaultWidth = 16.dp, defaultHeight = 16.dp,
        viewportWidth = 16f, viewportHeight = 16f,
    ).addPath(
        pathData = addPathNodes("M3.144 2.856C3.048 2.759 3 2.641 3 2.5C3 2.359 3.048 2.241 3.144 2.144C3.241 2.048 3.359 2 3.5 2L11.5 2C11.641 2 11.759 2.048 11.856 2.144C11.952 2.241 12 2.359 12 2.5C12 2.641 11.952 2.759 11.856 2.856C11.759 2.952 11.641 3 11.5 3L3.5 3C3.359 3 3.241 2.952 3.144 2.856ZM4.24 12.267L6.546 8.953L3.807 4.999L5.746 4.999L7.546 7.784L7.592 7.784L9.275 5.224L9.275 5.224L9.423 4.999L11.224 4.999L10.71 5.738L10.71 5.738L8.485 8.938L11.27 13L9.331 13L9.184 12.769L9.184 12.768L7.485 10.092L7.438 10.092L5.663 12.776L5.663 12.776L5.515 13L3.73 13L4.239 12.268L4.24 12.267Z"),
        fill = SolidColor(Color.Black),
    ).build()
}

// Icon(XBarIcon, contentDescription = null) tints it with LocalContentColor.
```

### Android XML

```xml
<!-- res/drawable/ic_x_bar.xml · Gentleface "x-bar" (line-round), MIT. https://gentleface.com/icons/x-bar -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="16dp"
    android:height="16dp"
    android:viewportWidth="16"
    android:viewportHeight="16"
    android:tint="?attr/colorControlNormal">
  <path
      android:fillColor="@android:color/white"
      android:pathData="M3.144 2.856C3.048 2.759 3 2.641 3 2.5C3 2.359 3.048 2.241 3.144 2.144C3.241 2.048 3.359 2 3.5 2L11.5 2C11.641 2 11.759 2.048 11.856 2.144C11.952 2.241 12 2.359 12 2.5C12 2.641 11.952 2.759 11.856 2.856C11.759 2.952 11.641 3 11.5 3L3.5 3C3.359 3 3.241 2.952 3.144 2.856ZM4.24 12.267L6.546 8.953L3.807 4.999L5.746 4.999L7.546 7.784L7.592 7.784L9.275 5.224L9.275 5.224L9.423 4.999L11.224 4.999L10.71 5.738L10.71 5.738L8.485 8.938L11.27 13L9.331 13L9.184 12.769L9.184 12.768L7.485 10.092L7.438 10.092L5.663 12.776L5.663 12.776L5.515 13L3.73 13L4.239 12.268L4.24 12.267Z"/>
</vector>
```

### Flutter

```dart
// Gentleface "x-bar" (line-round), MIT. https://gentleface.com/icons/x-bar
import 'package:flutter/widgets.dart';

class XBarIcon extends StatelessWidget {
  const XBarIcon({super.key, this.size = 16, this.color});
  final double size;
  final Color? color;

  @override
  Widget build(BuildContext context) => CustomPaint(
        size: Size.square(size),
        painter: _XBarIconPainter(color ?? IconTheme.of(context).color ?? const Color(0xFF000000)),
      );
}

class _XBarIconPainter extends CustomPainter {
  _XBarIconPainter(this.color);
  final Color color;

  @override
  void paint(Canvas canvas, Size size) {
    canvas.scale(size.width / 16, size.height / 16);
    final p = Path()
      ..moveTo(3.144, 2.856)
      ..cubicTo(3.048, 2.759, 3, 2.641, 3, 2.5)
      ..cubicTo(3, 2.359, 3.048, 2.241, 3.144, 2.144)
      ..cubicTo(3.241, 2.048, 3.359, 2, 3.5, 2)
      ..lineTo(11.5, 2)
      ..cubicTo(11.641, 2, 11.759, 2.048, 11.856, 2.144)
      ..cubicTo(11.952, 2.241, 12, 2.359, 12, 2.5)
      ..cubicTo(12, 2.641, 11.952, 2.759, 11.856, 2.856)
      ..cubicTo(11.759, 2.952, 11.641, 3, 11.5, 3)
      ..lineTo(3.5, 3)
      ..cubicTo(3.359, 3, 3.241, 2.952, 3.144, 2.856)
      ..close()
      ..moveTo(4.24, 12.267)
      ..lineTo(6.546, 8.953)
      ..lineTo(3.807, 4.999)
      ..lineTo(5.746, 4.999)
      ..lineTo(7.546, 7.784)
      ..lineTo(7.592, 7.784)
      ..lineTo(9.275, 5.224)
      ..lineTo(9.275, 5.224)
      ..lineTo(9.423, 4.999)
      ..lineTo(11.224, 4.999)
      ..lineTo(10.71, 5.738)
      ..lineTo(10.71, 5.738)
      ..lineTo(8.485, 8.938)
      ..lineTo(11.27, 13)
      ..lineTo(9.331, 13)
      ..lineTo(9.184, 12.769)
      ..lineTo(9.184, 12.768)
      ..lineTo(7.485, 10.092)
      ..lineTo(7.438, 10.092)
      ..lineTo(5.663, 12.776)
      ..lineTo(5.663, 12.776)
      ..lineTo(5.515, 13)
      ..lineTo(3.73, 13)
      ..lineTo(4.239, 12.268)
      ..lineTo(4.24, 12.267)
      ..close();
    canvas.drawPath(p, Paint()..color = color);
  }

  @override
  bool shouldRepaint(_XBarIconPainter old) => old.color != color;
}
```
