Zend certified PHP/Magento developer

Message Authentication Code (MAC) calculation using OpenSSL

I have (1) a cipher text (2) a key and (3) an IV. I need to find the authentication tag of the cipher text. It is known that the authentication tag is created with the HMAC-SHA256 message authentication code using the SHA256 fingerprint of the key.

Can someone guide me how can I find the authentication tag using OpenSSL commands? Thanks!