🔥 Just Launched! Werra Premium Template for HyväSee it in Action

Quick Ways To Get Formatted Price With Currency in Magento 2

By Sanjay JethvaUpdated on May 22, 2025 1 min read

You can get formatted price with currency in Magento 2 using the block method. Convert a plain number into a price format with a currency symbol using any one of the solutions given below.

Method To Get Formatted Price With Currency In Magento 2:

use Magento\Framework\Pricing\Helper\Data
protected $priceHelper;
public function __construct(Data $priceHelper)
{
    $this->priceHelper = $priceHelper;
}
public function getFormattedPrice($price)
{
    return $this->priceHelper->currency($price, true, false);
}

That’s all.

Please share the solution with fellow Magento developers via social media.

Thank you.

Sanjay Jethva Full Image
Article bySanjay Jethva

Sanjay is the co-founder and CTO of Meetanshi with hands-on expertise with Magento since 2011. He specializes in complex development, integrations, extensions, and customizations. Sanjay is one the top 50 contributor to the Magento community and is recognized by Adobe. His passion for Magento 2 and Shopify solutions has made him a trusted source for businesses seeking to optimize their online stores. He loves sharing technical solutions related to Magento 2 & Shopify.