> ## Documentation Index
> Fetch the complete documentation index at: https://docs.upstackdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Returning Customers: Repeat Buyers in Period

> Track the count of repeat buyers who placed orders in your selected period. Measure customer retention and loyalty with actual repeat customer numbers.

<Tip>
  The count of customers who placed orders and have at least one prior purchase on record.
</Tip>

## Formula

<Info>
  **Returning Customers** = **COUNT DISTINCT** ( Customer ID ) **WHERE** [customer\_type = returning\_customer](/data-dictionary/measures-and-dimensions)
</Info>

### Formula Components

| Metric                                                                               | Definition                                            |
| ------------------------------------------------------------------------------------ | ----------------------------------------------------- |
| **Customer ID**                                                                      | Unique identifier for each customer from Shopify      |
| [**customer\_type = returning\_customer**](/data-dictionary/measures-and-dimensions) | Filters to customers with at least one prior purchase |

| Metadata        |                             |
| --------------- | --------------------------- |
| **Type**        | Number                      |
| **Data Source** | [Shopify](/sources/shopify) |
| **Aggregation** | Count                       |

***

## Example

Your store served **1,847 returning customers** in February:

| Week   | Returning Customers | New Customers | Total Unique |
| ------ | ------------------- | ------------- | ------------ |
| Week 1 | 428                 | 284           | 712          |
| Week 2 | 412                 | 272           | 684          |
| Week 3 | 467                 | 289           | 756          |
| Week 4 | 540                 | 155           | 695          |

Your returning customer base grew throughout the month as early February buyers placed repeat orders.

***

## How It Works

Shopify tracks each customer's purchase history. A returning customer is anyone who has completed at least one order before the current one. This metric counts distinct returning customers—each repeat buyer counts once regardless of how many orders they placed in the period.

***

## When to Use

| Scenario                      | Action                                                         |
| ----------------------------- | -------------------------------------------------------------- |
| Tracking retention success    | Monitor growth in repeat buyers month over month               |
| Evaluating loyalty programs   | Compare returning customer counts before and after initiatives |
| Sizing your repeat buyer base | Understand how many loyal customers are actively purchasing    |
| Cohort retention analysis     | Track which acquisition cohorts produce the most repeat buyers |

***

## Related Metrics

| Metric                                                                                                 | Relationship                               |
| ------------------------------------------------------------------------------------------------------ | ------------------------------------------ |
| [New Customers](/reference/metrics/orders/customers/new-customers)                                     | First-time buyers (the complement)         |
| [Unique Customers](/reference/metrics/orders/customers/unique-customers)                               | Total distinct customers (New + Returning) |
| [Returning Customer %](/reference/metrics/orders/customers/returning-customer-percent)                 | Returning orders as percentage of total    |
| [Returning Customer Gross Revenue](/reference/metrics/orders/revenue/returning-customer-gross-revenue) | Revenue from repeat buyers                 |

[See all Customers metrics →](/reference/metrics/orders/customers)
