# calculate

> **calculate**(`data`): `PieceLink`

Defined in: [packages/synapse-core/src/piece/piece.ts:140](https://github.com/FilOzone/synapse-sdk/blob/7fdc04df4e3c52366a9f0cd55da4c05e20b2ed82/packages/synapse-core/src/piece/piece.ts#L140)

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