Magento 2 - How to move the product price block before addtocart button?

Go to below location


Copy file with Name addtocart.phtml & paste it to below location in your theme


Put the below code into the file above this <div class="actions"> present at around line no.31 .

<?php echo $this->getLayout()
                        'data' => [
                            'price_render' => 'product.price.render.default',
                            'price_type_code' => 'final_price',
                            'zone' => 'item_view'

Now go to the below location


Put the below code into the file with name catalog_product_view.xml

<?xml version="1.0"?>
<page xmlns:xsi="" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
         <referenceBlock name="" remove="true"/>

Note: Put your cache disabled or run the below command while you are doing this changes

php bin/magento cache:flush

To achieve this you may need to add your code in separate layout file for respective product type.

Try creating catalog_product_view_type_configurable.xml file for configurable product and then add below code in it.

<move element="" destination="" />

Note: Please check all product page by product type, there is default separate layout for bundle products. So if it is not working for any product type you can add separate layout file for that product type like above for configurable products also the referenceBlock/referenceContainer name may vary for product type.