Longformacus () is a small village in Berwickshire in the Scottish Borders area of Scotland. It is around north-west of Duns, in the Lammermuir Hills. The Dye Water runs through the village, flowing east towards its confluence with the Whiteadder Water nearby.