# How the price helper works in Ghost

Explainer · Norbert · Updated 12 Nov 2026 · 2 min read

Source: https://brightthemes.com/blog/ghost-price-helper

The {{price}} helper turns a tier or subscription amount into a formatted price, such as $9. Use it to show your membership prices on a custom pricing or account page.

Ghost stores prices in the smallest unit of the currency: $9 is saved as `900` cents. The `{{price}}` helper turns that number into a price people can read, with the right currency symbol and number format for your site's language.

Portal, Ghost's built-in sign-up popup, shows your prices for you. You need `{{price}}` when your theme shows them itself: a custom pricing page, a plan list on the homepage, or a member's account page.

## How it works

Pass it a plan, or an amount and a currency:

```hbs
{{price plan}}
{{!-- Outputs: $5 --}}
```

That is the same as writing out all the defaults:

```hbs
{{price plan.amount
  currency=plan.currency
  locale=@site.locale
  numberFormat="short"
  currencyFormat="symbol"
}}
```

The first value is the amount, in the smallest unit (cents for dollars and euros). The options are all optional:

- `currency`: the three-letter ISO code, such as `"USD"` or `"EUR"`. When you pass a `plan`, it uses the plan's currency.
- `locale`: the language used to format the number. The default is `@site.locale`, your site's publication language.
- `numberFormat`: `"short"` ($5, the default) or `"long"` ($5.00).
- `currencyFormat`: `"symbol"` ($5, the default), `"code"` (USD 5) or `"name"` (5 US dollars).

## Examples

### Prices of your tiers

Fetch your tiers with the `{{#get}}` helper and show the monthly and yearly price of each. The free tier has no price, so check first:

```hbs
{{#get "tiers" include="monthly_price,yearly_price,benefits" limit="100"}}
  {{#foreach tiers}}
    <h3>{{name}}</h3>
    {{#if monthly_price}}
      <a href="javascript:" data-portal="signup/{{id}}/monthly">
        {{price monthly_price currency=currency}}/month
      </a>
    {{/if}}
    {{#if yearly_price}}
      <a href="javascript:" data-portal="signup/{{id}}/yearly">
        {{price yearly_price currency=currency}}/year
      </a>
    {{/if}}
  {{/foreach}}
{{/get}}
```

Inside `{{#foreach tiers}}`, `monthly_price`, `yearly_price` and `currency` belong to the current tier. The `data-portal` links open Portal's checkout for that tier and billing period.

### A member's subscription

On an account page, loop over the member's subscriptions:

```hbs
{{#foreach @member.subscriptions}}
  <p>Your plan: {{price plan}}/{{plan.interval}}</p>
  {{!-- Outputs: Your plan: $99/year --}}
{{/foreach}}
```

`@member` is only set for signed-in members, so this shows nothing to visitors.

### A fixed amount

You can pass any number, for example a price that isn't a tier:

```hbs
{{price 4900 currency="USD"}}
{{!-- Outputs: $49 --}}

{{price 0 currency="USD"}}
{{!-- Outputs: $0 --}}
```

Without an amount, the helper prints only the currency symbol:

```hbs
{{price currency="EUR"}}
{{!-- Outputs: € --}}
```

## When to use it

Use `{{price}}` whenever your theme prints a price. It keeps the format the same across the site, follows each tier's currency and your site's language, and reads the price from the tier, so nothing goes out of date when you change one.

To [show different content to free and paid members](https://brightthemes.com/blog/ghost-member-specific-block), wrap it in `{{#if @member.paid}}`; for other comparisons, use [the match helper](https://brightthemes.com/blog/ghost-match-helper). To build the sign-up buttons around your prices, see [subscription forms in Ghost](https://brightthemes.com/blog/ghost-subscription-forms).
