Understanding exactly where your revenue comes from is critical for tax compliance, financial reporting, and localized marketing campaigns. Whether you need to calculate state taxes for accounting purposes or identify your most profitable cities to target future promotions, you need precise geographical sales data.
Extracting this data natively in WooCommerce can be complicated. The default reports do not provide an easy way to filter total sales generated by specific billing locations at the individual customer level.
In this tutorial, we will show you how to accurately calculate your total WooCommerce sales by country, state, or city using a frontend spreadsheet interface.
We will use the WP Sheet Editor plugin to filter your customer database by specific geographic locations. The plugin will automatically sum up the purchase history of the filtered users, giving you exact revenue numbers without requiring complex SQL queries.
You can download the plugin here:
Download WordPress Users Spreadsheet Plugin - or - Check the features
Video Tutorial
How do I calculate total sales by location in WooCommerce?
Once you have installed and activated the plugin, you will manage your WooCommerce buyers from a spreadsheet view instead of the standard WordPress users list.
Navigate to WP Sheet Editor > Edit users in your WordPress dashboard.
You will see all your registered users and customers displayed in a grid, with their billing and shipping details structured into distinct columns.

1. Calculate total sales by customer billing country
If you need to view your total revenue generated from an entire country (for example, the United States), follow these steps to filter your database.
Click on the Search tool located on the top toolbar.

Configure the advanced search parameters to target the exact billing country:
- Role: Select Customer
- Tick the Enable advanced filters checkbox.
- Field key: Select billing_country
- Operator: Choose =
- Value: Enter the target country (e.g., United States)
Click Run search.

The spreadsheet will refresh to display only the customers residing in that country. Look directly below the main toolbar. The plugin automatically aggregates the purchase histories of the filtered rows and displays the combined amount next to Total Sales.

2. Calculate total sales by customer billing state
For more granular tax reporting or regional analytics, you can calculate the revenue generated from a specific state or province (for example, New York or California).
Open the Search tool and enter the following parameters:
- Role: Select Customer
- Tick the Enable advanced filters checkbox.
- Field key: Select billing_state
- Operator: Choose =
- Value: Enter the specific state (e.g., New York)
Click Run search.

Once the grid updates to show only customers from that state, check the metrics bar below the toolbar to see the exact Total Sales generated by this regional segment.

3. Calculate total sales by customer billing city
If you are planning a hyper-local marketing campaign or analyzing urban logistics, you can narrow your revenue data down to a single city.
Open the Search tool and configure it to target the city field:
- Role: Select Customer
- Tick the Enable advanced filters checkbox.
- Field key: Select billing_city
- Operator: Choose =
- Value: Enter the target city (e.g., London, Los Angeles, or Miami)
Click Run search.

Just like before, the spreadsheet will isolate the customers located in that city, and the Total Sales metric at the top of the interface will dynamically update to reflect their combined spending.

Practical Analytics with WP Sheet Editor
Using the spreadsheet interface to analyze customer data is a practical alternative to installing heavy reporting plugins or writing custom database queries. By isolating specific billing metadata, WP Sheet Editor automatically processes the calculations for you.
You can apply this exact same workflow to calculate total sales by other critical metrics as well, including company name, specific email domains, or even custom user metadata.
You can download the plugin here:
Download WordPress Users Spreadsheet Plugin - or - Check the features