---
title: rawToWad
description: Convert 6-decimal USDC raw units to 18-decimal WAD.
---

> **For AI agents:** the complete documentation index is at [llms.txt](/llms.txt). Append `.md` to any page URL for its markdown version.

Multiplies by `10^12`. The inverse is [wadToRaw](/developers/math/wad-to-raw). Use [parseUsdc](/developers/parse-usdc) when the input is a decimal string, not atoms.

## Import

```ts
import { rawToWad } from "@repo/contract-client/math";
```

## Usage

```ts
import { parseUsdc } from "@repo/contract-client";
import { rawToWad } from "@repo/contract-client/math";

const wad = rawToWad(parseUsdc("1"));
// 1_000_000_000_000_000_000n
```

## Return Value

`bigint` (WAD).

## Parameters

### raw

- **Type:** `bigint`

Non-negative 6-decimal amount.

```ts
rawToWad(1_000_000n);
```

## Error

`InvalidAmountError` if `raw < 0`.
