# How to add two 2D histograms into a new 2D histogram

**URL:** <https://root-forum.cern.ch/t/how-to-add-two-2d-histograms-into-a-new-2d-histogram/52435>\
**Category:** Newbie\
**Created:** [November 19, 2022, 12:04pm UTC](https://root-forum.cern.ch/t/how-to-add-two-2d-histograms-into-a-new-2d-histogram/52435 "2022-11-19T12:04:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Songshaptak\_De](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/songshaptak_de/32/27468_2.png) [@Songshaptak\_De](https://root-forum.cern.ch/u/Songshaptak_De)\
**Post date:** [November 19, 2022, 12:04pm UTC](https://root-forum.cern.ch/t/how-to-add-two-2d-histograms-into-a-new-2d-histogram/52435/1 "2022-11-19T12:04:57Z")

</div>

Hi,  
I have two 2D histograms which I want to add and store it in a new 2D histogram in the following way,  
New2DHistogram = (100 x 2DHistogram1) + (50 x 2DHistogram2)  
Is there any command in ROOT which can do this in a single line?

_ROOT Version:_ 5.34/09  
_Platform:_ Scientific Linux

---

<div class="post-metadata">

**Author:** ![Dilicus](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dilicus/32/14338_2.png) [@Dilicus](https://root-forum.cern.ch/u/Dilicus)\
**Post date:** [November 19, 2022, 1:41pm UTC](https://root-forum.cern.ch/t/how-to-add-two-2d-histograms-into-a-new-2d-histogram/52435/2 "2022-11-19T13:41:15Z")

</div>

Hi,  
have a look at [Add](https://root.cern.ch/doc/master/classTH1.html#a1913bea50293a57b9ee65bf7f65a26e1)
