# calculate

```ts
function calculate(data): PieceLink;
```

Defined in: [packages/synapse-core/src/piece.ts:265](https://github.com/FilOzone/synapse-sdk/blob/1d6c4b9fe34534bf1087dfe41491b72be0b46858/packages/synapse-core/src/piece.ts#L265)

Calculate the PieceCID (Piece Commitment) for a given data blob

## Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `data` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) | The binary data to calculate the PieceCID for |

## Returns

`PieceLink`

The calculated PieceCID CID